Ignore upload in service worker

This commit is contained in:
Josef Citrine 2016-06-13 13:49:48 +01:00
parent 64d28f0b1f
commit 6e87e330f3

View file

@ -56,8 +56,9 @@ self.addEventListener('activate', function (event) {
// Basic offline mode
// Just respond with an offline error page for now
self.addEventListener('fetch', function(event) {
if (event.request.url.indexOf('stage.pony.fm') > -1) {
event.respondWith(fetch(event.request));
if (event.request.url.indexOf('stage.pony.fm') > -1 || event.request.url.indexOf('upload') > -1) {
// Ignore some requests
return;
} else {
event.respondWith(
caches.match(event.request).then(function (response) {