From 2dd4434ceb976d429e164f78d5941e08ffa2d802 Mon Sep 17 00:00:00 2001 From: Will Rouesnel Date: Mon, 22 May 2023 11:59:50 +1000 Subject: [PATCH] Add support for nginx 444 default response The default nginx 444 response drops the inbound connection without sending any response to the client. --- backend/templates/default.conf | 6 ++++++ frontend/js/app/settings/default-site/main.ejs | 4 ++++ frontend/js/i18n/messages.json | 1 + 3 files changed, 11 insertions(+) diff --git a/backend/templates/default.conf b/backend/templates/default.conf index ec68530c..cc590f9d 100644 --- a/backend/templates/default.conf +++ b/backend/templates/default.conf @@ -24,6 +24,12 @@ server { } {% endif %} +{%- if value == "444" %} + location / { + return 444; + } +{% endif %} + {%- if value == "redirect" %} location / { return 301 {{ meta.redirect }}; diff --git a/frontend/js/app/settings/default-site/main.ejs b/frontend/js/app/settings/default-site/main.ejs index 126c9d0a..f1c4ccf6 100644 --- a/frontend/js/app/settings/default-site/main.ejs +++ b/frontend/js/app/settings/default-site/main.ejs @@ -18,6 +18,10 @@ >
<%- i18n('settings', 'default-site-404') %>
+