mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: closes #7583
This commit is contained in:
@@ -95,6 +95,7 @@
|
|||||||
"feeds:disableSitemap": 0,
|
"feeds:disableSitemap": 0,
|
||||||
"sitemapTopics": 500,
|
"sitemapTopics": 500,
|
||||||
"maintenanceMode": 0,
|
"maintenanceMode": 0,
|
||||||
|
"maintenanceModeStatus": 503,
|
||||||
"votesArePublic": 0,
|
"votesArePublic": 0,
|
||||||
"maximumInvites": 0,
|
"maximumInvites": 0,
|
||||||
"username:disableEdit": 0,
|
"username:disableEdit": 0,
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"maintenance-mode": "Maintenance Mode",
|
"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.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",
|
"maintenance-mode.message": "Maintenance Message",
|
||||||
"headers": "Headers",
|
"headers": "Headers",
|
||||||
"headers.allow-from": "Set ALLOW-FROM to Place NodeBB in an iFrame",
|
"headers.allow-from": "Set ALLOW-FROM to Place NodeBB in an iFrame",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ module.exports = function (middleware) {
|
|||||||
if (isAdmin) {
|
if (isAdmin) {
|
||||||
return callback();
|
return callback();
|
||||||
}
|
}
|
||||||
res.status(503);
|
res.status(meta.config.maintenanceModeStatus);
|
||||||
data = {
|
data = {
|
||||||
site_title: meta.config.title || 'NodeBB',
|
site_title: meta.config.title || 'NodeBB',
|
||||||
message: meta.config.maintenanceModeMessage,
|
message: meta.config.maintenanceModeMessage,
|
||||||
|
|||||||
@@ -13,6 +13,10 @@
|
|||||||
<p class="help-block">
|
<p class="help-block">
|
||||||
[[admin/settings/advanced:maintenance-mode.help]]
|
[[admin/settings/advanced:maintenance-mode.help]]
|
||||||
</p>
|
</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">
|
<div class="form-group">
|
||||||
<label for="maintenanceModeMessage">[[admin/settings/advanced:maintenance-mode.message]]</label>
|
<label for="maintenanceModeMessage">[[admin/settings/advanced:maintenance-mode.message]]</label>
|
||||||
<textarea class="form-control" data-field="maintenanceModeMessage"></textarea>
|
<textarea class="form-control" data-field="maintenanceModeMessage"></textarea>
|
||||||
|
|||||||
Reference in New Issue
Block a user