diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2021-04-14 23:41:03 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2021-04-14 23:41:03 -0400 |
| commit | 682c078830c24eb986211e497f8c187fe381cb2c (patch) | |
| tree | 8fa10450ec3abf8ee1af63fac20feb0c3c045188 /nginx | |
| parent | d069da17c8c48777c29bc8c7855b13c8cd6e6aa0 (diff) | |
simplify error page configuration
Diffstat (limited to 'nginx')
| -rw-r--r-- | nginx/nginx.conf | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 26b3d5bb..b4456be1 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -112,8 +112,8 @@ http { server_name grapheneos.org; root /srv/grapheneos.org; - error_page 403 =404 /404.html; - error_page 404 /404.html; + error_page 403 =404 /404; + error_page 404 /404; include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; @@ -215,13 +215,7 @@ http { include snippets/security-headers.conf; add_header Cross-Origin-Resource-Policy "same-origin" always; include snippets/preload.conf; - } - - location = /404.html { - internal; - include snippets/security-headers.conf; - add_header Cross-Origin-Resource-Policy "same-origin" always; - include snippets/preload.conf; + try_files $uri.html =404; } # broken link (now fixed) on https://noagendaphone.com/ with UTF-8 replacement character |
