diff options
| author | Daniel Micay <danielmicay@gmail.com> | 2020-05-14 10:38:37 -0400 |
|---|---|---|
| committer | Daniel Micay <danielmicay@gmail.com> | 2020-05-14 10:42:24 -0400 |
| commit | e1190639095429a536ae708a1365e22b7757c0fc (patch) | |
| tree | d30970bf993bc1e9b9177ef6bcb2d500f1851d27 /nginx/server.conf | |
| parent | f354c40a32169e7bf889f37d7409a3cb64416f78 (diff) | |
use location block for index redirect
Diffstat (limited to 'nginx/server.conf')
| -rw-r--r-- | nginx/server.conf | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/nginx/server.conf b/nginx/server.conf index 68ebf9fb..6dbc36d7 100644 --- a/nginx/server.conf +++ b/nginx/server.conf @@ -35,10 +35,6 @@ server { return 301 /$1; } - if ($request_uri ~ ^(.*)/index$) { - return 301 $1/; - } - location = /security.txt { return 301 /.well-known/security.txt; } @@ -82,6 +78,10 @@ server { http2_push /grapheneos.css?18; } + location ~ "^(.*)/index$" { + return 301 $1/; + } + location ~ "\.(ico|webmanifest)$" { include /etc/nginx/snippets/security-headers.conf; add_header Cache-Control "public, max-age=604800"; |
