This commit is contained in:
Rizky 2024-06-21 12:58:12 +07:00
parent c0e042ce0d
commit 8d8a6aecc5
1 changed files with 6 additions and 4 deletions

View File

@ -17,10 +17,10 @@ export const _ = {
const body = await req.arrayBuffer();
const headers = {} as Record<string, string>;
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(