diff --git a/system1-factory/web/sw.js b/system1-factory/web/sw.js index e66115b..9e1bbf3 100644 --- a/system1-factory/web/sw.js +++ b/system1-factory/web/sw.js @@ -20,10 +20,12 @@ self.addEventListener('activate', function(event) { }); self.addEventListener('fetch', function(event) { - // API, POST, cross-origin 요청은 캐싱하지 않음 + // API, POST, cross-origin, 로그인/대시보드 프록시 경로는 캐싱하지 않음 if (event.request.url.includes('/api/')) return; if (event.request.method !== 'GET') return; if (!event.request.url.startsWith(self.location.origin)) return; + var path = new URL(event.request.url).pathname; + if (path === '/dashboard' || path === '/login' || path === '/auth' || path.startsWith('/auth/')) return; event.respondWith( fetch(event.request)