diff options
Diffstat (limited to 'dom/workers/test/serviceworkers/gzip_redirect_worker.js')
-rw-r--r-- | dom/workers/test/serviceworkers/gzip_redirect_worker.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/dom/workers/test/serviceworkers/gzip_redirect_worker.js b/dom/workers/test/serviceworkers/gzip_redirect_worker.js new file mode 100644 index 000000000..72aeba222 --- /dev/null +++ b/dom/workers/test/serviceworkers/gzip_redirect_worker.js @@ -0,0 +1,13 @@ +self.addEventListener('fetch', function (event) { + if (!event.request.url.endsWith('sw_clients/does_not_exist.html')) { + return; + } + + event.respondWith(new Response('', { + status: 301, + statusText: 'Moved Permanently', + headers: { + 'Location': 'refresher_compressed.html' + } + })); +}); |