From 536803853a82f265085011817a697d8871a67015 Mon Sep 17 00:00:00 2001 From: nai-degen Date: Wed, 9 Oct 2024 16:44:53 -0500 Subject: [PATCH] uses removeHeader instead of setHeader to empty string --- src/proxy/middleware/request/mutators/strip-headers.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proxy/middleware/request/mutators/strip-headers.ts b/src/proxy/middleware/request/mutators/strip-headers.ts index 0eea20d..1237e16 100644 --- a/src/proxy/middleware/request/mutators/strip-headers.ts +++ b/src/proxy/middleware/request/mutators/strip-headers.ts @@ -5,8 +5,8 @@ import { ProxyReqMutator } from "../index"; * privacy reasons. */ export const stripHeaders: ProxyReqMutator = (manager) => { - manager.setHeader("origin", ""); - manager.setHeader("referer", ""); + manager.removeHeader("origin"); + manager.removeHeader("referer"); // Some APIs refuse requests coming from browsers to discourage embedding // API keys in client-side code, so we must remove all CORS/fetch headers.