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:
commit
14a68d3709
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue