diff --git a/src/PowderCoating.Web/wwwroot/sw.js b/src/PowderCoating.Web/wwwroot/sw.js index 2ce4a66..abd657d 100644 --- a/src/PowderCoating.Web/wwwroot/sw.js +++ b/src/PowderCoating.Web/wwwroot/sw.js @@ -12,15 +12,7 @@ const SKIP_PREFIXES = ['/hubs/', '/Kiosk/PollSession']; self.addEventListener('install', () => self.skipWaiting()); self.addEventListener('activate', e => e.waitUntil(self.clients.claim())); -self.addEventListener('fetch', e => { - const url = new URL(e.request.url); - - // Always skip cross-origin requests - if (url.origin !== self.location.origin) return; - - // Skip SignalR hubs and kiosk polling — let the browser handle these directly - if (SKIP_PREFIXES.some(p => url.pathname.startsWith(p))) return; - - // Passthrough: no caching, no modification - e.respondWith(fetch(e.request)); -}); +// No fetch interception — all requests handled natively by the browser. +// The SW exists solely for PWA installability; calling e.respondWith(fetch(request)) +// causes TypeError failures on localhost HTTPS due to certificate trust differences +// in the SW context, breaking JS/CSS resource loads.