Merge pull request #151 from davidmonterocrespo24/fix-espidf-build-timeout

fix(nginx): use relative redirects so trailing-slash 301s preserve HTTPS
This commit is contained in:
David Montero Crespo 2026-05-09 01:55:13 -03:00 committed by GitHub
commit 14a68d3709
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 0 deletions

View File

@ -5,6 +5,14 @@ server {
root /usr/share/nginx/html;
index index.html;
# Use relative redirects (e.g. `/examples/` instead of
# `http://velxio.dev/examples/`) so trailing-slash and other internal
# redirects don't downgrade HTTPS clients to HTTP. We sit behind a TLS
# terminator (host nginx Cloudflare); without this nginx generates
# absolute Location headers using the listening protocol (http) and the
# browser blocks the redirect as mixed-content.
absolute_redirect off;
# Security headers
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;