fix(sw): bypass service worker entirely for /locales/ paths
This commit is contained in:
parent
6f7384b98b
commit
7e2d2c3dfa
1 changed files with 2 additions and 6 deletions
|
|
@ -68,13 +68,9 @@ self.addEventListener('fetch', (event) => {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NEVER CACHE: Admin files, API calls - always fetch fresh, never cache
|
// NEVER CACHE: Admin files, API calls, translations - bypass service worker entirely
|
||||||
if (NEVER_CACHE_PATHS.some(path => url.pathname.startsWith(path))) {
|
if (NEVER_CACHE_PATHS.some(path => url.pathname.startsWith(path))) {
|
||||||
event.respondWith(
|
// Don't intercept at all - let browser handle it directly
|
||||||
fetch(request).catch(() => {
|
|
||||||
throw new Error('Network required for admin/API resources');
|
|
||||||
})
|
|
||||||
);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue