also allow JSON

This commit is contained in:
Matthias Pfefferle 2023-08-11 09:22:46 +02:00
parent 6e2656311b
commit bc7e173fe0

View file

@ -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;
}
}