diff --git a/nginx.conf b/nginx.conf index 58248d1..a4cd907 100644 --- a/nginx.conf +++ b/nginx.conf @@ -17,9 +17,10 @@ http { error_page 404 /404.html; add_header X-Content-Type-Options nosniff always; add_header Referrer-Policy strict-origin-when-cross-origin always; - # Service worker must not be cached aggressively + # Service worker must not be cached location = /sw.js { - add_header Cache-Control "no-cache"; + expires -1; + add_header Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" always; add_header X-Content-Type-Options nosniff always; } location ~* \.(css|js|svg|png|jpg|ico|woff2?|json)$ { @@ -28,6 +29,7 @@ http { } location / { try_files $uri $uri/ $uri/index.html =404; + add_header Cache-Control "no-cache" always; } } } diff --git a/site/404.html b/site/404.html index aae5849..1c42459 100644 --- a/site/404.html +++ b/site/404.html @@ -6,7 +6,7 @@