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) => {
|
self.addEventListener('fetch', async (event) => {
|
||||||
if (event.request.method === "POST" &&
|
if (event.request.method === "GET") {
|
||||||
(await event.request.blob()).type !== "application/json" &&
|
|
||||||
event.request.body) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
event.respondWith(handleRequest(event.request));
|
event.respondWith(handleRequest(event.request));
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
function isCacheableThumbnail(url) {
|
function isCacheableThumbnail(url) {
|
||||||
|
|
Reference in a new issue