diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-07-08 17:45:41 +0200 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2022-08-08 14:26:11 +0200 |
commit | 0ed987a8dd578b9597e12bf448abb4e452afa7c1 (patch) | |
tree | 0437282a0cee6d6f017334e0de1c942b236090e0 /lib/base.php | |
parent | fe2f8b5d189cbcda8c4f197197169a6e015d6622 (diff) | |
download | nextcloud-server-0ed987a8dd578b9597e12bf448abb4e452afa7c1.tar.gz nextcloud-server-0ed987a8dd578b9597e12bf448abb4e452afa7c1.zip |
Set special header for 503 maintenance mode
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>
Diffstat (limited to 'lib/base.php')
-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 |