File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,9 @@ export function getProxiedConnection(
190
190
method : 'CONNECT' ,
191
191
path : parsedTarget . path ,
192
192
} ;
193
+ const headers : http . OutgoingHttpHeaders = {
194
+ Host : parsedTarget . path ,
195
+ } ;
193
196
// Connect to the subchannel address as a proxy
194
197
if ( isTcpSubchannelAddress ( address ) ) {
195
198
options . host = address . host ;
@@ -198,14 +201,13 @@ export function getProxiedConnection(
198
201
options . socketPath = address . path ;
199
202
}
200
203
if ( 'grpc.http_connect_creds' in channelOptions ) {
201
- options . headers = {
202
- 'Proxy-Authorization' :
203
- 'Basic ' +
204
- Buffer . from (
205
- channelOptions [ 'grpc.http_connect_creds' ] as string
206
- ) . toString ( 'base64' ) ,
207
- } ;
204
+ headers [ 'Proxy-Authorization' ] =
205
+ 'Basic ' +
206
+ Buffer . from (
207
+ channelOptions [ 'grpc.http_connect_creds' ] as string
208
+ ) . toString ( 'base64' ) ;
208
209
}
210
+ options . headers = headers
209
211
const proxyAddressString = subchannelAddressToString ( address ) ;
210
212
trace ( 'Using proxy ' + proxyAddressString + ' to connect to ' + options . path ) ;
211
213
return new Promise < ProxyConnectionResult > ( ( resolve , reject ) => {
You can’t perform that action at this time.
0 commit comments