Merge pull request #9877 from annando/application-json

Accept "application/json" as application type for ActivityPub
This commit is contained in:
Hypolite Petovan 2021-01-29 10:14:16 -05:00 committed by GitHub
commit 43f0f6bbdc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -77,6 +77,7 @@ class ActivityPub
public static function isRequest()
{
return stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/activity+json') ||
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') ||
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/ld+json');
}