diff --git a/bun.lockb b/bun.lockb index 75716679..1af2fe87 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/pkgs/core/api/_proxy.ts b/pkgs/core/api/_proxy.ts index a514d7f7..db92547d 100644 --- a/pkgs/core/api/_proxy.ts +++ b/pkgs/core/api/_proxy.ts @@ -1,7 +1,7 @@ import brotliPromise from "brotli-wasm"; import { apiContext } from "service-srv"; import { gzipAsync } from "utils/diff/diff"; - +import { decompress } from "@cloudpss/zstd"; const brotli = await brotliPromise; export const _ = { @@ -38,9 +38,9 @@ export const _ = { res_body = await res.arrayBuffer(); if (res_headers["content-encoding"] === "gzip") { res_body = await gzipAsync(new Uint8Array(res_body)); - } else { delete res_headers["content-encoding"]; } + return new Response(res_body, { headers: res_headers }); } catch (e: any) { new Response( diff --git a/pkgs/core/package.json b/pkgs/core/package.json index 663468f0..ee27cc79 100644 --- a/pkgs/core/package.json +++ b/pkgs/core/package.json @@ -2,20 +2,21 @@ "name": "core", "version": "0.0.1", "dependencies": { + "@cloudpss/zstd": "^0.3.0", "@surfy/multipart-parser": "^1.0.2", "@swc/core": "^1.4.17", + "@swc/types": "^0.1.8", "@types/mime": "^3.0.3", "@types/unzipper": "^0.10.8", - "esbuild": "^0.21.5", - "@swc/types": "^0.1.8", "acorn-walk": "^8.3.3", "brotli-wasm": "^3.0.1", + "esbuild": "^0.21.5", "execa": "^8.0.1", "fs-jetpack": "^5.1.0", "lmdb": "^2.8.5", "mime": "^3.0.0", - "pino": "^8.16.1", "msgpackr": "^1.10.1", + "pino": "^8.16.1", "pino-pretty": "^10.2.3", "radash": "^11.0.0", "radix3": "^1.1.0",