]> git.mxchange.org Git - friendica.git/blobdiff - src/Protocol/ActivityPub.php
Centralize Vary header declaration in ActivityPub::isRequest
[friendica.git] / src / Protocol / ActivityPub.php
index 603416a5d2bedb97f9ddb6425a4229589ddcab84..ad1e9367cad4df50aa47b4546878352477ad165c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * @copyright Copyright (C) 2010-2022, the Friendica project
+ * @copyright Copyright (C) 2010-2023, the Friendica project
  *
  * @license GNU AGPL version 3 or any later version
  *
@@ -52,8 +52,8 @@ use Friendica\Util\JsonLD;
  * - Polling the outboxes for missing content?
  *
  * Missing parts from DFRN:
- * - Public Forum
- * - Private Forum
+ * - Public Group
+ * - Private Group
  * - Relocation
  */
 class ActivityPub
@@ -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');