fix
This commit is contained in:
parent
1309a9db3e
commit
bef936f5d0
|
|
@ -36,6 +36,16 @@ export const _ = {
|
|||
res_headers[k] = v;
|
||||
});
|
||||
res_body = await res.arrayBuffer();
|
||||
if (res_headers["content-encoding"] === "gzip") {
|
||||
res_body = await gzipAsync(new Uint8Array(res_body));
|
||||
delete res_headers["content-encoding"];
|
||||
} else if (res_headers["content-encoding"] === "zstd") {
|
||||
res_body = await decompress(res_body);
|
||||
delete res_headers["content-encoding"];
|
||||
} else if (res_headers["content-encoding"] === "br") {
|
||||
res_body = await brotli.decompress(res_body);
|
||||
delete res_headers["content-encoding"];
|
||||
}
|
||||
|
||||
return new Response(res_body, { headers: res_headers });
|
||||
} catch (e: any) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue