diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-07-08 18:45:41 +0300 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-08-08 15:26:11 +0300 |
commit | 0ed987a8dd578b9597e12bf448abb4e452afa7c1 (patch) | |
tree | 0437282a0cee6d6f017334e0de1c942b236090e0 | |
parent | fe2f8b5d189cbcda8c4f197197169a6e015d6622 (diff) |
Set special header for 503 maintenance modeenhancement/maintenance-mode-http-header
This removes ambiguity with a 503 returned by app code, web server or
similar. Front-end and clients can then handle this state accordingly.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
-rw-r--r-- | lib/base.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/base.php b/lib/base.php index 26ad684a81a..ef83f6525ad 100644 --- a/lib/base.php +++ b/lib/base.php @@ -295,6 +295,7 @@ class OC { if (((bool) $systemConfig->getValue('maintenance', false)) && OC::$SUBURI != '/core/ajax/update.php') { // send http status 503 http_response_code(503); + header('X-Nextcloud-Maintenance-Mode: 1'); header('Retry-After: 120'); // render error page |