diff options
author | Pytal <24800714+Pytal@users.noreply.github.com> | 2022-07-11 11:10:26 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-11 11:10:26 -0700 |
commit | 57ae32e3c39969f585c23fb047f49a0f7bfac1cc (patch) | |
tree | cc16fbb864b585bf531f82561dd23cd67cb40639 | |
parent | 16b5e6bc7f78f796eb7d8a4e1bd70cdc838dc119 (diff) | |
parent | 222a9523b518940e3011d70a78884fc24d42eb18 (diff) | |
download | nextcloud-server-57ae32e3c39969f585c23fb047f49a0f7bfac1cc.tar.gz nextcloud-server-57ae32e3c39969f585c23fb047f49a0f7bfac1cc.zip |
Merge pull request #33175 from nextcloud/fix/request-json-xml-not-found
-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(); |