don't handle non-GET requests by default

This commit is contained in:
Rich Harris
2018-05-11 07:42:41 -04:00
committed by GitHub
parent 280f48f73e
commit e84fb7bc7c

View File

@@ -32,6 +32,8 @@ self.addEventListener('activate', event => {
});
self.addEventListener('fetch', event => {
if (event.request.method !== 'GET') return;
const url = new URL(event.request.url);
// don't try to handle e.g. data: URIs