ry fix pwa auth error locally
This commit is contained in:
@ -2,6 +2,19 @@
|
||||
|
||||
console.log('Service Worker Loaded...')
|
||||
|
||||
self.addEventListener('fetch', (event) => {
|
||||
try {
|
||||
if (event.request.url.includes('/api/auth/callback/')) {
|
||||
// Use network only strategy for auth routes, or bypass SW completely
|
||||
event.respondWith(fetch(event.request));
|
||||
return;
|
||||
}
|
||||
// other caching strategies...
|
||||
} catch (error) {
|
||||
console.error(error)
|
||||
}
|
||||
});
|
||||
|
||||
self.addEventListener('push', function (event) {
|
||||
console.log('Push message', event)
|
||||
if (!(self.Notification && self.Notification.permission === 'granted')) {
|
||||
|
Reference in New Issue
Block a user