node-http-proxy
node-http-proxy copied to clipboard
Proxy to proxy is not working fine
Dears,
I have found that toProxy option has an issue and modified the code like below which is working fine. Modified snippet in web-incoming.js
var httpOptions=common.setupOutgoing(options.ssl || {}, options, req); if(options.proxy){ httpOptions.host=options.proxy.host; httpOptions.port=options.proxy.port; httpOptions.path = options.target.protocol+"//"+options.target.host+options.target.path; delete httpOptions.hostname; } var proxyReq = (options.target.protocol === 'https:' ? https : http).request( httpOptions );