use location block for index redirect
This commit is contained in:
parent
f354c40a32
commit
e119063909
@ -35,10 +35,6 @@ server {
|
|||||||
return 301 /$1;
|
return 301 /$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($request_uri ~ ^(.*)/index$) {
|
|
||||||
return 301 $1/;
|
|
||||||
}
|
|
||||||
|
|
||||||
location = /security.txt {
|
location = /security.txt {
|
||||||
return 301 /.well-known/security.txt;
|
return 301 /.well-known/security.txt;
|
||||||
}
|
}
|
||||||
@ -82,6 +78,10 @@ server {
|
|||||||
http2_push /grapheneos.css?18;
|
http2_push /grapheneos.css?18;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location ~ "^(.*)/index$" {
|
||||||
|
return 301 $1/;
|
||||||
|
}
|
||||||
|
|
||||||
location ~ "\.(ico|webmanifest)$" {
|
location ~ "\.(ico|webmanifest)$" {
|
||||||
include /etc/nginx/snippets/security-headers.conf;
|
include /etc/nginx/snippets/security-headers.conf;
|
||||||
add_header Cache-Control "public, max-age=604800";
|
add_header Cache-Control "public, max-age=604800";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user