diff --git a/docker/nginx.conf b/docker/nginx.conf index 33ca0d00..1989323b 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -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;