Skip to content

Commit

Permalink
fix(nginx): intercept errors and display custom error page
Browse files Browse the repository at this point in the history
  • Loading branch information
r-birkner authored and blind-oracle committed Mar 13, 2024
1 parent bb0ac2e commit ea37f35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Expand Up @@ -7,6 +7,8 @@ server {
ssl_certificate {ssl_certificate_path};
ssl_certificate_key {ssl_certificate_key_path};

include "includes/error_pages.conf";

# Match all requests to /sw.js that also have the header 'Service-Worker: script' and deliver the service worker uninstall script instead.
location /sw.js {
if ($http_service_worker = "script") {
Expand Down
@@ -1,3 +1,5 @@
proxy_intercept_errors on;

error_page 451 /451.html;

location /451.html {
Expand Down

0 comments on commit ea37f35

Please sign in to comment.