From bc7e173fe05958530d2ea2709296ffe64ee0af4b Mon Sep 17 00:00:00 2001 From: Matthias Pfefferle Date: Fri, 11 Aug 2023 09:22:46 +0200 Subject: [PATCH] also allow JSON --- includes/functions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 6d9013d..73d3499 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -305,8 +305,9 @@ function is_activitypub_request() { * and return true when the header includes at least one of the following: * - application/activity+json * - application/ld+json + * - application/json */ - if ( preg_match( '/(application\/(ld\+json|activity\+json))/', $accept ) ) { + if ( preg_match( '/(application\/(ld\+json|activity\+json|json))/i', $accept ) ) { return true; } }