MDL-55916 setup: Maintenance mode serves HTTP 503
This commit is contained in:
@@ -313,6 +313,9 @@ if (!defined('WS_SERVER')) {
|
||||
// Detect CLI maintenance mode - this is useful when you need to mess with database, such as during upgrades
|
||||
if (file_exists("$CFG->dataroot/climaintenance.html")) {
|
||||
if (!CLI_SCRIPT) {
|
||||
header($_SERVER['SERVER_PROTOCOL'] . ' 503 Moodle under maintenance');
|
||||
header('Status: 503 Moodle under maintenance');
|
||||
header('Retry-After: 300');
|
||||
header('Content-type: text/html; charset=utf-8');
|
||||
header('X-UA-Compatible: IE=edge');
|
||||
/// Headers to make it not cacheable and json
|
||||
|
||||
Reference in New Issue
Block a user