blob: b4941d3683dbc9daeafaf0702858c726b1e12761 [file] [log] [blame]
importScripts('/common/get-host-info.sub.js');
var remoteUrl = get_host_info()['HTTP_REMOTE_ORIGIN'] + '/WebKit/service-workers/resources/lengthy-pass.py';
self.addEventListener('fetch', (event) => {
if (event.request.url.indexOf("html") === -1)
event.respondWith(fetch(remoteUrl, {mode: 'no-cors'}).then(response => response.clone()));
});