blob: 8539b40066dd91bbfaf7ef240b8104dcb2ab3b27 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
self.addEventListener('fetch', (event) => {
const url = event.request.url;
// Network fallback.
if (url.indexOf('network-fallback') >= 0) {
return;
}
// Don't intercept redirect.
if (url.indexOf('redirect.py') >= 0) {
return;
}
event.respondWith(fetch(url));
});
|