diff options
-rw-r--r-- | lib/base.php | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 814f30b5af3..26ad684a81a 100644 --- a/lib/base.php +++ b/lib/base.php @@ -1048,6 +1048,13 @@ class OC { return; } + // Handle requests for JSON or XML + $acceptHeader = $request->getHeader('Accept'); + if (in_array($acceptHeader, ['application/json', 'application/xml'], true)) { + http_response_code(404); + return; + } + // Someone is logged in if (\OC::$server->getUserSession()->isLoggedIn()) { OC_App::loadApps(); |