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
5b93c34485
commit
b63aaf90a8
@ -59,15 +59,15 @@
|
||||
return;
|
||||
}
|
||||
|
||||
//Parse the url
|
||||
var requestURL = new URL(event.request.url);
|
||||
|
||||
//Skip admin url's
|
||||
if(requestURL.pathname.indexOf('admin') >= 0){
|
||||
log('Service worker: skip admin ' + event.request.url);
|
||||
return;
|
||||
}
|
||||
|
||||
//Parse the url
|
||||
var requestURL = new URL(event.request.url);
|
||||
|
||||
//Test for images
|
||||
if (/\.(jpg|jpeg|png|gif|webp)$/.test(requestURL.pathname)) {
|
||||
log('Service worker: skip image ' + event.request.url);
|
||||
|
Loading…
Reference in New Issue
Block a user