kopia lustrzana https://github.com/nextcloud/social
issue with some headers
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/134/head
rodzic
89848f8510
commit
2a47f895ad
|
@ -323,6 +323,16 @@ class ActivityPubController extends Controller {
|
|||
// uncomment this line to display the result that would be return to an ActivityPub service (TEST)
|
||||
// return true;
|
||||
|
||||
// TODO - cleaner to being able to parse:
|
||||
// - 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"'
|
||||
// - 'application/activity+json, application/ld+json'
|
||||
$accept = explode(',', $this->request->getHeader('Accept'));
|
||||
$accept = array_map('trim', $accept);
|
||||
|
||||
if (in_array('application/ld+json', $accept)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if ($this->request->getHeader('Accept')
|
||||
=== 'application/ld+json; profile="https://www.w3.org/ns/activitystreams"') {
|
||||
return true;
|
||||
|
|
Ładowanie…
Reference in New Issue