mirror of
https://github.com/a2nt/silverstripe-progressivewebapp.git
synced 2024-10-22 11:05:45 +02:00
Update ServiceWorker.ss
This commit is contained in:
parent
b435128ac0
commit
5b93c34485
@ -58,6 +58,12 @@
|
|||||||
if (event.request.method !== 'GET') {
|
if (event.request.method !== 'GET') {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Skip admin url's
|
||||||
|
if(requestURL.pathname.indexOf('admin') >= 0){
|
||||||
|
log('Service worker: skip admin ' + event.request.url);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//Parse the url
|
//Parse the url
|
||||||
var requestURL = new URL(event.request.url);
|
var requestURL = new URL(event.request.url);
|
||||||
@ -118,4 +124,4 @@
|
|||||||
return response || fetch(event.request);
|
return response || fetch(event.request);
|
||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
//<%--Ugly fix for code highlights</script>--%>
|
//<%--Ugly fix for code highlights</script>--%>
|
||||||
|
Loading…
Reference in New Issue
Block a user