This commit is contained in:
2025-12-18 10:46:18 -05:00
parent ee311cc120
commit dee5d38b58
3 changed files with 11 additions and 6 deletions

View File

@@ -37,9 +37,14 @@ http {
try_files $uri =404;
}
# Serve HTML files without .html extension (e.g., /admin -> admin.html)
location ~ ^/([a-zA-Z0-9_-]+)$ {
try_files /$1.html =404;
}
# Serve static files
location / {
try_files $uri $uri/ /index.html;
try_files $uri $uri/ =404;
# Apply X-Frame-Options to other files
add_header X-Frame-Options "SAMEORIGIN" always;
}