kopia lustrzana https://gitlab.com/rysiekpl/libresilient
bugfix: external requests fixed (ref. #31)
rodzic
6fe4e94199
commit
3025278899
|
@ -808,12 +808,12 @@ self.addEventListener('fetch', async event => {
|
|||
// External requests go through a regular fetch()
|
||||
if (!event.request.url.startsWith(self.location.origin)) {
|
||||
self.log('service-worker', 'External request; current origin: ' + self.location.origin)
|
||||
return void event.respondWith(fetch(event.request));
|
||||
return fetch(event.request);
|
||||
}
|
||||
|
||||
// Non-GET requests go through a regular fetch()
|
||||
if (event.request.method !== 'GET') {
|
||||
return void event.respondWith(fetch(event.request));
|
||||
return fetch(event.request);
|
||||
}
|
||||
|
||||
// clean the URL, removing any fragment identifier
|
||||
|
|
Ładowanie…
Reference in New Issue