diff --git a/web/nginx.conf b/web/nginx.conf index a66ccfd7..88170bb6 100644 --- a/web/nginx.conf +++ b/web/nginx.conf @@ -4,6 +4,12 @@ server { root /usr/share/nginx/html; index index.html index.htm; + # Caddy terminates TLS and proxies here over plain HTTP, so nginx must not + # guess scheme/port for its own directory-redirect (e.g. /blog -> /blog/): + # absolute_redirect would otherwise leak this container's internal + # http://host:3000 into the Location header sent to real visitors. + absolute_redirect off; + location / { try_files $uri $uri/ /index.html; }