forked from mystiq/hydrogen-web
respond with only for GET requests
This commit is contained in:
parent
d1491cc203
commit
c1a8ffd814
1 changed files with 2 additions and 5 deletions
|
@ -69,12 +69,9 @@ async function purgeOldCaches() {
|
|||
}
|
||||
|
||||
self.addEventListener('fetch', async (event) => {
|
||||
if (event.request.method === "POST" &&
|
||||
(await event.request.blob()).type !== "application/json" &&
|
||||
event.request.body) {
|
||||
return;
|
||||
if (event.request.method === "GET") {
|
||||
event.respondWith(handleRequest(event.request));
|
||||
}
|
||||
event.respondWith(handleRequest(event.request));
|
||||
});
|
||||
|
||||
function isCacheableThumbnail(url) {
|
||||
|
|
Loading…
Reference in a new issue