Merge pull request #34343 from nextcloud/fix/ocs-api-missing-maintenance-mode-headers

Fix missing maintenance mode header for OCS request
This commit is contained in:
blizzz 2022-10-01 21:41:12 +02:00 committed by GitHub
commit dd033f6ee7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -35,6 +35,7 @@ if (\OCP\Util::needUpgrade()
// since the behavior of apps or remotes are unpredictable during
// an upgrade, return a 503 directly
http_response_code(503);
header('X-Nextcloud-Maintenance-Mode: 1');
$response = new \OC\OCS\Result(null, 503, 'Service unavailable');
OC_API::respond($response, OC_API::requestedFormat());
exit;