From 21d21326f6f82083fe5d660374109b33b7cbadf3 Mon Sep 17 00:00:00 2001 From: Takuya Murakami Date: Wed, 25 Apr 2018 12:35:45 +0900 Subject: [PATCH] fix issue #32: set host header for CONNECT request. --- index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/index.js b/index.js index 3ee9abc..6cd2b42 100644 --- a/index.js +++ b/index.js @@ -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) {