The sw.js and workbox-*.js files were being caught by the immutable static asset regex (expires 1y), causing stale service workers and potential 502 errors during re-registration. Use location = /sw.js (exact match, highest Nginx priority) and a regex for workbox files that appears before the asset cache block. Also removes the dead duplicate location blocks at the bottom of the config that were never reached due to regex priority. Co-authored-by: Cursor <cursoragent@cursor.com>
5.6 KiB
5.6 KiB