diff --git a/nginx.conf.template b/nginx.conf.template index 65ac465..cd5e196 100644 --- a/nginx.conf.template +++ b/nginx.conf.template @@ -34,5 +34,13 @@ server { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Host $host; + + # Disable caching through the double-proxy chain (NPM → frontend nginx → API) + # Without this, browsers cache responses keyed by the HTTPS origin, then send + # conditional requests (If-None-Match) that get lost or mismatched in the proxy chain. + proxy_cache off; + add_header Cache-Control "no-store, no-cache, must-revalidate" always; + add_header Pragma "no-cache" always; + add_header Vary "*" always; } }