mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Test for url to see if cache is needed
This commit is contained in:
1 parent
3d1cc2ee91
commit
37be18f408
1 file changed
+5
-1
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user