Skip to content

Commit

Permalink
Fix: exclude SSE connection being intercepted by SW
Browse files Browse the repository at this point in the history
  • Loading branch information
hookor authored and cuconveniencestore committed May 31, 2024
1 parent a939c97 commit fc29b23
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions public/pwabuilder-sw.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,5 +179,6 @@ const handleError = error => {
};

self.addEventListener('fetch', event => {
if (event.request.headers.get('Accept') === 'text/event-stream') return;
event.respondWith(cacheOrFetch(event.request).catch(handleError));
});

0 comments on commit fc29b23

Please sign in to comment.