Skip to content

Commit

Permalink
Merge pull request #2942 from wrouesnel/444_default_support
Browse files Browse the repository at this point in the history
Add support for nginx 444 default response
  • Loading branch information
jc21 authored Jul 20, 2023
2 parents f1b7156 + 2dd4434 commit f38cb5b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions backend/templates/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ server {
}
{% endif %}

{%- if value == "444" %}
location / {
return 444;
}
{% endif %}

{%- if value == "redirect" %}
location / {
return 301 {{ meta.redirect }};
Expand Down
4 changes: 4 additions & 0 deletions frontend/js/app/settings/default-site/main.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<input class="custom-control-input" name="value" value="404" type="radio" required <%- value === '404' ? 'checked' : '' %>>
<div class="custom-control-label"><%- i18n('settings', 'default-site-404') %></div>
</label>
<label class="custom-control custom-radio">
<input class="custom-control-input" name="value" value="444" type="radio" required <%- value === '444' ? 'checked' : '' %>>
<div class="custom-control-label"><%- i18n('settings', 'default-site-444') %></div>
</label>
<label class="custom-control custom-radio">
<input class="custom-control-input" name="value" value="redirect" type="radio" required <%- value === 'redirect' ? 'checked' : '' %>>
<div class="custom-control-label"><%- i18n('settings', 'default-site-redirect') %></div>
Expand Down
1 change: 1 addition & 0 deletions frontend/js/i18n/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@
"default-site": "Default Site",
"default-site-congratulations": "Congratulations Page",
"default-site-404": "404 Page",
"default-site-444": "No Response (444)",
"default-site-html": "Custom Page",
"default-site-redirect": "Redirect"
}
Expand Down

0 comments on commit f38cb5b

Please sign in to comment.