node-http-proxy icon indicating copy to clipboard operation
node-http-proxy copied to clipboard

Proxy to proxy is not working fine

Open praveen06527 opened this issue 3 years ago • 0 comments

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 );

praveen06527 avatar Jan 22 '22 20:01 praveen06527