fix(sw): skip caching non-http/https requests
This commit is contained in:
@@ -16,6 +16,9 @@ self.addEventListener('activate', e => {
|
||||
self.addEventListener('fetch', e => {
|
||||
const url = new URL(e.request.url);
|
||||
|
||||
// Only handle http/https requests
|
||||
if (url.protocol !== 'http:' && url.protocol !== 'https:') return;
|
||||
|
||||
// Pass through API calls
|
||||
if (url.pathname === '/extract-audio') return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user