X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FModule%2FXrd.php;h=af40bc3b026aaed3ebf73c2516965d44b1f424fe;hb=e1863951986ba5be173758324a00652bc5af870c;hp=71a3d37a9e996e81e34710055fd60f526d1abdb2;hpb=6a5266c6b8a2a5324fe3f1543ec63230e4d1f16d;p=friendica.git diff --git a/src/Module/Xrd.php b/src/Module/Xrd.php index 71a3d37a9e..af40bc3b02 100644 --- a/src/Module/Xrd.php +++ b/src/Module/Xrd.php @@ -38,6 +38,8 @@ class Xrd extends BaseModule { protected function rawContent(array $request = []) { + header('Vary: Accept', false); + // @TODO: Replace with parameter from router if (DI::args()->getArgv()[0] == 'xrd') { if (empty($_GET['uri'])) { @@ -80,6 +82,8 @@ class Xrd extends BaseModule throw new NotFoundException('Invalid host name for xrd query: ' . $host); } + header('Vary: Accept', false); + if ($name == User::getActorName()) { $owner = User::getSystemAccount(); if (empty($owner)) { @@ -152,7 +156,6 @@ class Xrd extends BaseModule ] ]; header('Access-Control-Allow-Origin: *'); - header('Vary: Accept', false); System::jsonExit($json, 'application/jrd+json; charset=utf-8'); } @@ -230,7 +233,6 @@ class Xrd extends BaseModule ]; header('Access-Control-Allow-Origin: *'); - header('Vary: Accept', false); System::jsonExit($json, 'application/jrd+json; charset=utf-8'); } @@ -328,7 +330,6 @@ class Xrd extends BaseModule ]); header('Access-Control-Allow-Origin: *'); - header('Vary: Accept', false); System::httpExit($xmlString, Response::TYPE_XML, 'application/xrd+xml'); } }