Skip to content

Commit

Permalink
Merge pull request #33173 from nextcloud/enhancement/maintenance-mode…
Browse files Browse the repository at this point in the history
…-http-header

Set special header for 503 maintenance mode
  • Loading branch information
ChristophWurst authored Aug 10, 2022
2 parents 54c6d81 + 0ed987a commit d17e069
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/base.php
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,7 @@ public static function checkMaintenanceMode(\OC\SystemConfig $systemConfig) {
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
Expand Down

0 comments on commit d17e069

Please sign in to comment.