[add] progress streaming
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-12-01 07:35:51 -05:00
parent 2c240f2f5c
commit 3057b86002
11 changed files with 257 additions and 22 deletions

File diff suppressed because one or more lines are too long

View File

@@ -253,6 +253,13 @@ self.addEventListener("install", function (event) {
event.waitUntil(handleInstall(event));
});
self.addEventListener("fetch", (event) =>
event.respondWith(handleFetch(event))
);
self.addEventListener("fetch", (event) => {
/**
* Weird things happen when a service worker attempts to handle a request
* when the server responds with chunked transfer encoding. Right now we only
* use chunked encoding on POSTs. So this is to avoid processing those.
**/
if (event.request.method != "GET") return;
return event.respondWith(handleFetch(event));
});