]> git.mxchange.org Git - friendica.git/blobdiff - src/Module/Xrd.php
Update function / rearrange tab order
[friendica.git] / src / Module / Xrd.php
index 6a4c0e860d31be4c12b07e005074a705d3647ba8..af40bc3b026aaed3ebf73c2516965d44b1f424fe 100644 (file)
@@ -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)) {
@@ -326,7 +330,6 @@ class Xrd extends BaseModule
                ]);
 
                header('Access-Control-Allow-Origin: *');
-
                System::httpExit($xmlString, Response::TYPE_XML, 'application/xrd+xml');
        }
 }