Centralize Vary header declaration in ActivityPub::isRequest
- Vary header should be set every time we vary the display based on an HTTP header value
This commit is contained in:
@@ -87,6 +87,8 @@ class ActivityPub
|
||||
*/
|
||||
public static function isRequest(): bool
|
||||
{
|
||||
header('Vary: Accept', false);
|
||||
|
||||
$isrequest = stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/activity+json') ||
|
||||
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/json') ||
|
||||
stristr($_SERVER['HTTP_ACCEPT'] ?? '', 'application/ld+json');
|
||||
|
||||
Reference in New Issue
Block a user