Skip to content

Commit

Permalink
fix issue request#32: set host header for CONNECT request.
Browse files Browse the repository at this point in the history
  • Loading branch information
tmurakam committed Apr 25, 2018
1 parent eb2b1b1 commit 21d2132
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
{ method: 'CONNECT'
, path: options.host + ':' + options.port
, agent: false
, headers: {
host: options.host + ':' + options.port
}
}
)
if (connectOptions.proxyAuth) {
Expand Down

0 comments on commit 21d2132

Please sign in to comment.