mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2025-01-31 22:51:39 +01:00
respond with only for GET requests
This commit is contained in:
parent
d1491cc203
commit
c1a8ffd814
@ -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) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user