fix: replace stripRelayHeaders with filterHeaders and add BLOCKED_HEADERS set

This commit is contained in:
MythEclipse committed 2026-05-07 21:16:31 +07:00
1 parent f2ebba51bb
commit f3ec82cbbf
3 files changed
+87 -33

No files matched your search

+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);