This commit is contained in:
Dallas Lu 2026-06-09 14:41:15 +08:00
parent c50569d73e
commit a624163120
No known key found for this signature in database
27 changed files with 215 additions and 6 deletions

View file

@ -4,9 +4,13 @@ server_tokens off;
add_header Referrer-Policy strict-origin-when-cross-origin always;
add_header X-Frame-Options SAMEORIGIN always;
add_header X-Content-Type-Options nosniff always;
# Explicitly disable the legacy XSS Auditor. Modern browsers removed it, and
# some older implementations created security bugs of their own.
add_header X-XSS-Protection "0" always;
# Redirect `example.com.` to `example.com`
# Redirect `example.com.` to `example.com`. Use $host on the target so nginx
# emits the normalized host without the trailing dot.
if ($http_host ~ "\.$" ){
rewrite ^(.*) $scheme://$host$1 permanent;
}