fix proxy
This commit is contained in:
parent
244bd86691
commit
803057b3a5
|
|
@ -1,4 +1,4 @@
|
||||||
FROM oven/bun:1.1.10 as base
|
FROM oven/bun:1.1.13 as base
|
||||||
WORKDIR /app/prasi/repo
|
WORKDIR /app/prasi/repo
|
||||||
|
|
||||||
RUN apt-get update
|
RUN apt-get update
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
||||||
|
import { apiContext } from "service-srv";
|
||||||
|
|
||||||
|
export const _ = {
|
||||||
|
url: "/",
|
||||||
|
async api() {
|
||||||
|
const { req, res } = apiContext(this);
|
||||||
|
return "This is api";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -38,8 +38,6 @@ export const _ = {
|
||||||
res_body = await res.arrayBuffer();
|
res_body = await res.arrayBuffer();
|
||||||
if (res_headers["content-encoding"] === "gzip") {
|
if (res_headers["content-encoding"] === "gzip") {
|
||||||
res_body = await gzipAsync(new Uint8Array(res_body));
|
res_body = await gzipAsync(new Uint8Array(res_body));
|
||||||
} if (res_headers["content-encoding"] === "br") {
|
|
||||||
res_body = brotli.decompress(new Uint8Array(res_body));
|
|
||||||
} else {
|
} else {
|
||||||
delete res_headers["content-encoding"];
|
delete res_headers["content-encoding"];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue