diff --git a/src/platform/web/docroot/sw.js b/src/platform/web/docroot/sw.js index 21fdf2d2..9b5da128 100644 --- a/src/platform/web/docroot/sw.js +++ b/src/platform/web/docroot/sw.js @@ -68,8 +68,10 @@ async function purgeOldCaches() { } } -self.addEventListener('fetch', (event) => { - if (event.request.url.indexOf("upload") !== -1) { +self.addEventListener('fetch', async (event) => { + if (event.request.method === "POST" && + (await event.request.blob()).type !== "application/json" && + event.request.body) { return; } event.respondWith(handleRequest(event.request));