diff --git a/backend/templates/dead_host.conf b/backend/templates/dead_host.conf index 7a06469a9..2e7d2a007 100644 --- a/backend/templates/dead_host.conf +++ b/backend/templates/dead_host.conf @@ -22,5 +22,7 @@ server { } {% endif %} + # Custom + include /data/nginx/custom/server_dead[.]conf; } {% endif %} diff --git a/docs/src/advanced-config/index.md b/docs/src/advanced-config/index.md index c9b42bcc7..373fd08bb 100644 --- a/docs/src/advanced-config/index.md +++ b/docs/src/advanced-config/index.md @@ -181,6 +181,7 @@ You can add your custom configuration snippet files at `/data/nginx/custom` as f - `/data/nginx/custom/server_stream.conf`: Included at the end of every stream server block - `/data/nginx/custom/server_stream_tcp.conf`: Included at the end of every TCP stream server block - `/data/nginx/custom/server_stream_udp.conf`: Included at the end of every UDP stream server block + - `/data/nginx/custom/server_dead.conf`: Included at the end of every 404 server block Every file is optional. diff --git a/frontend/js/app/dashboard/main.js b/frontend/js/app/dashboard/main.js index 4765d061e..c2e82f855 100644 --- a/frontend/js/app/dashboard/main.js +++ b/frontend/js/app/dashboard/main.js @@ -50,7 +50,8 @@ module.exports = Mn.View.extend({ onRender: function () { let view = this; - Api.Reports.getHostStats() + if (typeof view.stats.hosts === 'undefined') { + Api.Reports.getHostStats() .then(response => { if (!view.isDestroyed()) { view.stats.hosts = response; @@ -60,6 +61,7 @@ module.exports = Mn.View.extend({ .catch(err => { console.log(err); }); + } }, /**