added cache-busting service-worker and removed caching for service-worker.js (vite uses sw.js)

This commit is contained in:
Carter 2025-08-21 14:33:22 -06:00
parent 85ccecdcdc
commit aeb93d19d2
2 changed files with 30 additions and 0 deletions

View file

@ -71,6 +71,12 @@ http {
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
# Force re-cache of old service-worker
location = /service-worker.js {
root /usr/share/nginx/html; # adjust if your build folder is elsewhere
add_header Cache-Control "no-store, no-cache, must-revalidate";
}
# Redirect old /index.html requests to new file
location = /index.html {
return 301 /indexV2.html;