diff options
| -rw-r--r-- | nginx/nginx.conf | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/nginx/nginx.conf b/nginx/nginx.conf index 4511fb1c..6aef6e32 100644 --- a/nginx/nginx.conf +++ b/nginx/nginx.conf @@ -120,6 +120,15 @@ http { return 301 $1/$2; } + if ($request_uri ~ ^(.*)/index$) { + return 301 $1/; + } + + # https://www.twipu.com/GrapheneOS doesn't handle links with fragments properly + if ($request_uri ~ "^/(.*)<a href=$") { + return 301 https://grapheneos.org/$1; + } + location = /security.txt { return 301 /.well-known/security.txt; } @@ -212,10 +221,6 @@ http { return 301 /; } - location ~ "^(.*)/index$" { - return 301 $1/; - } - location ~ "\.(ico|webmanifest)$" { include snippets/security-headers.conf; add_header Cache-Control "public, max-age=604800"; @@ -238,11 +243,6 @@ http { add_header Cache-Control "public, max-age=1800"; } - # https://www.twipu.com/GrapheneOS doesn't handle links with fragments properly - location ~ "^/(.*)<a href=$" { - return 301 https://grapheneos.org/$1; - } - location ~ "\.(br|gz)$" { internal; } |
