Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Merge pull request #30 from tmurakam/feature/29-fix-host-header
Browse files Browse the repository at this point in the history
bug fix #29: set host header for CONNECT request.
  • Loading branch information
koichik committed Sep 10, 2018
2 parents 8d93d47 + f214468 commit 567a6e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/tunnel.js
Expand Up @@ -106,7 +106,10 @@ TunnelingAgent.prototype.createSocket = function createSocket(options, cb) {
var connectOptions = mergeOptions({}, self.proxyOptions, {
method: 'CONNECT',
path: options.host + ':' + options.port,
agent: false
agent: false,
headers: {
host: options.host + ':' + options.port
}
});
if (connectOptions.proxyAuth) {
connectOptions.headers = connectOptions.headers || {};
Expand Down

0 comments on commit 567a6e7

Please sign in to comment.