File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -599,13 +599,13 @@ export class PassThroughHandler extends PassThroughHandlerDefinition {
599
599
headersManuallyModified = ! ! modifiedReq ?. headers ;
600
600
const clientHeaders = rawHeadersToObject ( clientReq . rawHeaders )
601
601
let headers = modifiedReq ?. headers || clientHeaders ;
602
- Object . assign ( headers ,
603
- isH2Downstream
604
- ? getH2HeadersAfterModification ( reqUrl , clientHeaders , modifiedReq ?. headers )
605
- : ! this . forwarding || ! this . forwarding . updateHostHeader
606
- ? { 'host' : getHostAfterModification ( reqUrl , clientHeaders , modifiedReq ?. headers ) }
607
- : { }
608
- ) ;
602
+ if ( ! this . forwarding || this . forwarding . updateHostHeader === false ) {
603
+ Object . assign ( headers ,
604
+ isH2Downstream
605
+ ? getH2HeadersAfterModification ( reqUrl , clientHeaders , modifiedReq ?. headers )
606
+ : { 'host' : getHostAfterModification ( reqUrl , clientHeaders , modifiedReq ?. headers ) }
607
+ ) ;
608
+ }
609
609
610
610
validateCustomHeaders (
611
611
clientHeaders ,
You can’t perform that action at this time.
0 commit comments