fix(pwa): prevent immutable caching of /sw.js and bust SW registration to v5
This commit is contained in:
@@ -37,6 +37,12 @@ server {
|
||||
try_files /bimi-logo.svg =404;
|
||||
}
|
||||
|
||||
# Service Worker must never be cached as immutable
|
||||
location = /sw.js {
|
||||
add_header Cache-Control "no-cache, no-store, must-revalidate" always;
|
||||
try_files /sw.js =404;
|
||||
}
|
||||
|
||||
# Cache other static assets
|
||||
location ~* \.(css|js|woff2?|ttf|svg|png|jpg|jpeg|ico|gif|webp)$ {
|
||||
expires 7d;
|
||||
|
||||
Reference in New Issue
Block a user