File tree 1 file changed +3
-2
lines changed
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 {
23
23
// We strip this header if it appears in any request, and then things
24
24
// work fine.
25
25
// See https://github.com/http-party/node-http-proxy/issues/1647
26
- const HEADER_BLACKLIST = new Set ( [ "trailer" ] ) ;
26
+ const HEADER_BLACKLIST = "trailer" ;
27
27
28
28
// setupOutgoing -- Copies the right headers from `options` and `req` to
29
29
// `outgoing` which is then used to fire the proxied request by calling
@@ -70,8 +70,9 @@ export function setupOutgoing(
70
70
// outgoing.headers['Trailer'] won't work, because
71
71
// it might be {'TrAiLeR':...}
72
72
for ( const header in outgoing . headers ) {
73
- if ( HEADER_BLACKLIST . has ( header . toLowerCase ( ) ) ) {
73
+ if ( HEADER_BLACKLIST == header . toLowerCase ( ) ) {
74
74
delete outgoing . headers [ header ] ;
75
+ break ;
75
76
}
76
77
}
77
78
You can’t perform that action at this time.
0 commit comments