|
|
@ -465,12 +465,14 @@ middleware.maintenanceMode = function(req, res, next) {
|
|
|
|
res.status(503);
|
|
|
|
res.status(503);
|
|
|
|
|
|
|
|
|
|
|
|
if (!isApiRoute.test(req.url)) {
|
|
|
|
if (!isApiRoute.test(req.url)) {
|
|
|
|
|
|
|
|
middleware.applyCSRF(req, res, function() {
|
|
|
|
middleware.buildHeader(req, res, function() {
|
|
|
|
middleware.buildHeader(req, res, function() {
|
|
|
|
res.render('maintenance', {
|
|
|
|
res.render('maintenance', {
|
|
|
|
site_title: meta.config.title || 'NodeBB',
|
|
|
|
site_title: meta.config.title || 'NodeBB',
|
|
|
|
message: meta.config.maintenanceModeMessage
|
|
|
|
message: meta.config.maintenanceModeMessage
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
translator.translate('[[pages:maintenance.text, ' + meta.config.title + ']]', meta.config.defaultLang || 'en_GB', function(translated) {
|
|
|
|
translator.translate('[[pages:maintenance.text, ' + meta.config.title + ']]', meta.config.defaultLang || 'en_GB', function(translated) {
|
|
|
|
res.json({
|
|
|
|
res.json({
|
|
|
|