1
0
mirror of https://github.com/SuperBFG7/ympd synced 2024-12-26 19:10:25 +00:00

Fix: don't use serviceworker for http:// uris -> fixes http stream in local player

This commit is contained in:
jcorporation 2018-09-20 23:43:58 +01:00
parent 05b93894e8
commit 006eb6d28c

View File

@ -28,14 +28,15 @@ self.addEventListener('install', function(event) {
}); });
self.addEventListener('fetch', function(event) { self.addEventListener('fetch', function(event) {
if (event.request.url.match('^http://'))
return false;
event.respondWith( event.respondWith(
caches.match(event.request).then(function(response) { caches.match(event.request).then(function(response) {
if (response) if (response)
return response return response
else else
return fetch(event.request); return fetch(event.request);
} })
)
); );
}); });