fix: ignore non-http schemes in service worker to prevent cache error
This commit is contained in:
@@ -118,6 +118,12 @@ self.addEventListener('message', (event) => {
|
||||
|
||||
// 🚀 FETCH: Offline-First Strategy
|
||||
self.addEventListener('fetch', (event) => {
|
||||
// 🛡️ SECURITY/STABILITY: Only process http/https schemes.
|
||||
// Prevents "Failed to execute 'put' on 'Cache': Request scheme 'chrome-extension' is unsupported"
|
||||
if (!event.request.url.startsWith('http')) {
|
||||
return;
|
||||
}
|
||||
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
// CRITICAL: Bypass Auth/API/Supabase early and COMPLETELY.
|
||||
|
||||
Reference in New Issue
Block a user