File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export interface Outgoing extends Outgoing0 {
2323// We strip this header if it appears in any request, and then things
2424// work fine.
2525// See https://github.com/http-party/node-http-proxy/issues/1647
26- const HEADER_BLACKLIST = new Set ( [ "trailer" ] ) ;
26+ const HEADER_BLACKLIST = "trailer" ;
2727
2828// setupOutgoing -- Copies the right headers from `options` and `req` to
2929// `outgoing` which is then used to fire the proxied request by calling
@@ -70,8 +70,9 @@ export function setupOutgoing(
7070 // outgoing.headers['Trailer'] won't work, because
7171 // it might be {'TrAiLeR':...}
7272 for ( const header in outgoing . headers ) {
73- if ( HEADER_BLACKLIST . has ( header . toLowerCase ( ) ) ) {
73+ if ( HEADER_BLACKLIST == header . toLowerCase ( ) ) {
7474 delete outgoing . headers [ header ] ;
75+ break ;
7576 }
7677 }
7778
You can’t perform that action at this time.
0 commit comments