uses removeHeader instead of setHeader to empty string

This commit is contained in:
nai-degen 2024-10-09 16:44:53 -05:00
parent ad0a3c0936
commit 536803853a
1 changed files with 2 additions and 2 deletions

View File

@ -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.