diff --git a/src/service-worker.ts b/src/service-worker.ts index 94bdf95bb..5d2267fbc 100644 --- a/src/service-worker.ts +++ b/src/service-worker.ts @@ -22,7 +22,11 @@ sw.addEventListener('install', (event) => { await cache.addAll(ASSETS); } - event.waitUntil(addFilesToCache()); + // Check if the page URL does not match the exclusion path + const shouldCache = !/\/console\/auth\/oauth2\/.*/.test(location.pathname); + if (shouldCache) { + event.waitUntil(addFilesToCache()); + } }); sw.addEventListener('activate', (event) => {