fix: replace stripRelayHeaders with filterHeaders and add BLOCKED_HEADERS set

This commit is contained in:
MythEclipse
2026-05-07 21:16:31 +07:00
parent f2ebba51bb
commit f3ec82cbbf
3 changed files with 87 additions and 33 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ import {
buildRelayRequest,
createRelayResponse,
normalizeTargetUrl,
stripRelayHeaders,
filterHeaders,
isAllowedTarget,
} from "@/lib/relay-utils";
@@ -50,7 +50,7 @@ async function handler(req: Request): Promise<Response> {
);
}
const headers = stripRelayHeaders(new Headers(req.headers));
const headers = filterHeaders(new Headers(req.headers));
const fetchOptions = buildRelayRequest(req, targetUrl, headers);
const response = await fetch(targetUrl, fetchOptions);