From 8d8a6aecc535c8bdb55ffb1c508beaa8ec635fde Mon Sep 17 00:00:00 2001 From: Rizky Date: Fri, 21 Jun 2024 12:58:12 +0700 Subject: [PATCH] fix --- pkgs/core/api/_proxy.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/core/api/_proxy.ts b/pkgs/core/api/_proxy.ts index d28df4aa..b5c63034 100644 --- a/pkgs/core/api/_proxy.ts +++ b/pkgs/core/api/_proxy.ts @@ -17,10 +17,10 @@ export const _ = { const body = await req.arrayBuffer(); const headers = {} as Record; req.headers.forEach((v, k) => { - // if (k.startsWith("sec-")) return; - // if (k.startsWith("connection")) return; - // if (k.startsWith("dnt")) return; - // if (k.startsWith("host")) return; + if (k.startsWith("sec-")) return; + if (k.startsWith("connection")) return; + if (k.startsWith("dnt")) return; + if (k.startsWith("host")) return; headers[k] = v; }); @@ -47,6 +47,8 @@ export const _ = { delete res_headers["content-encoding"]; } + console.log(url, res_headers); + return new Response(res_body, { headers: res_headers }); } catch (e: any) { new Response(