From 8a3f8984f9a7f6efd1cf731cae49b9f04d262e41 Mon Sep 17 00:00:00 2001 From: kyle Date: Sat, 4 Jul 2026 19:45:02 +0000 Subject: [PATCH] Alters nginx config for backend proxying to prevent caching in double-proxied environs --- nginx.conf.template | 8 ++++++++ 1 file changed, 8 insertions(+) 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; } }