fixed maintenance mode page not working with new CSRF implementation, #2424

v1.18.x
Julian Lam 10 years ago
parent b665aeee83
commit 5292a47a96

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

Loading…
Cancel
Save