mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Change regex to string comparison
This commit is contained in:
1 parent
37be18f408
commit
33a7d9aeb2
1 file changed
+2
-2
@@ -3,7 +3,7 @@
|
||||
/// <reference lib="esnext" />
|
||||
/// <reference lib="webworker" />
|
||||
|
||||
import { build, files, version } from '$service-worker';
|
||||
import { build, files, version, base } from '$service-worker';
|
||||
|
||||
const sw = self as unknown as ServiceWorkerGlobalScope;
|
||||
|
||||
@@ -23,7 +23,7 @@ sw.addEventListener('install', (event) => {
|
||||
}
|
||||
|
||||
// Check if the page URL does not match the exclusion path
|
||||
const shouldCache = !/\/console\/auth\/oauth2\/.*/.test(location.pathname);
|
||||
const shouldCache = !base.startsWith('/console/auth');
|
||||
if (shouldCache) {
|
||||
event.waitUntil(addFilesToCache());
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user