fix(sw): chrome-extension URLs aus Cache ausschließen
TypeError beim Cachen von chrome-extension:// Requests verhindert. Protocol-Check am Anfang des Fetch-Handlers. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
71272fa425
commit
b8b2655cd0
1 changed files with 3 additions and 0 deletions
3
sw.js
3
sw.js
|
|
@ -50,6 +50,9 @@ self.addEventListener('activate', event => {
|
|||
self.addEventListener('fetch', event => {
|
||||
const url = new URL(event.request.url);
|
||||
|
||||
// Nur http/https cachen - chrome-extension:// etc. überspringen
|
||||
if (url.protocol !== 'http:' && url.protocol !== 'https:') return;
|
||||
|
||||
// PWA Auth Endpoints - immer Netzwerk
|
||||
if (url.pathname.includes('pwa_auth.php')) {
|
||||
event.respondWith(fetch(event.request));
|
||||
|
|
|
|||
Loading…
Reference in a new issue