diff --git a/services/web-ui/nginx.conf b/services/web-ui/nginx.conf index 1fcb3de..e76fa76 100644 --- a/services/web-ui/nginx.conf +++ b/services/web-ui/nginx.conf @@ -19,11 +19,19 @@ server { root /usr/share/nginx/html; # Cache static assets aggressively - location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { + location ~* \.(css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ { expires 1y; add_header Cache-Control "public, immutable"; } + # JS files — must revalidate so a redeploy is picked up immediately. + # The static index.html links api.js with a ?v=N query string anyway, + # but defence-in-depth: never let a stale .js sit in a browser cache. + location ~* \.js$ { + expires -1; + add_header Cache-Control "no-cache, must-revalidate"; + } + # HTML files - no cache location ~* \.html?$ { expires -1; diff --git a/services/web-ui/public/capture.html b/services/web-ui/public/capture.html index 10386d1..eb3c9ea 100644 --- a/services/web-ui/public/capture.html +++ b/services/web-ui/public/capture.html @@ -312,7 +312,7 @@
- + + + + +