mirror of
https://github.com/friendica/friendica
synced 2025-05-02 23:44:23 +02:00
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:
parent
31fbe70ec7
commit
6e2ab6c3af
7 changed files with 7 additions and 8 deletions
|
@ -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');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue