fix proxy

This commit is contained in:
Rizky 2024-06-20 12:22:44 +07:00
parent 244bd86691
commit 803057b3a5
3 changed files with 10 additions and 3 deletions

View File

@ -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

9
app/srv/api/api Normal file
View File

@ -0,0 +1,9 @@
import { apiContext } from "service-srv";
export const _ = {
url: "/",
async api() {
const { req, res } = apiContext(this);
return "This is api";
}
}

View File

@ -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"];
} }