added cache-busting service-worker and removed caching for service-worker.js (vite uses sw.js)
This commit is contained in:
parent
85ccecdcdc
commit
aeb93d19d2
2 changed files with 30 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue