feat: closes #7583

v1.18.x
Baris Usakli 6 years ago
parent c9ca72d0f3
commit cf5aeace6b

@ -95,6 +95,7 @@
"feeds:disableSitemap": 0,
"sitemapTopics": 500,
"maintenanceMode": 0,
"maintenanceModeStatus": 503,
"votesArePublic": 0,
"maximumInvites": 0,
"username:disableEdit": 0,

@ -1,6 +1,7 @@
{
"maintenance-mode": "Maintenance Mode",
"maintenance-mode.help": "When the forum is in maintenance mode, all requests will be redirected to a static holding page. Administrators are exempt from this redirection, and are able to access the site normally.",
"maintenance-mode.status": "Maintenance Mode Status Code",
"maintenance-mode.message": "Maintenance Message",
"headers": "Headers",
"headers.allow-from": "Set ALLOW-FROM to Place NodeBB in an iFrame",

@ -24,7 +24,7 @@ module.exports = function (middleware) {
if (isAdmin) {
return callback();
}
res.status(503);
res.status(meta.config.maintenanceModeStatus);
data = {
site_title: meta.config.title || 'NodeBB',
message: meta.config.maintenanceModeMessage,

@ -13,6 +13,10 @@
<p class="help-block">
[[admin/settings/advanced:maintenance-mode.help]]
</p>
<div class="form-group">
<label for="maintenanceModeStatus">[[admin/settings/advanced:maintenance-mode.status]]</label>
<input class="form-control" type="text" data-field="maintenanceModeStatus">
</div>
<div class="form-group">
<label for="maintenanceModeMessage">[[admin/settings/advanced:maintenance-mode.message]]</label>
<textarea class="form-control" data-field="maintenanceModeMessage"></textarea>

Loading…
Cancel
Save