mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
Merge pull request #235 from Filirom1/patch-1
prefer `target.hostname` over `target.host`
This commit is contained in:
commit
f28c62c815
@ -209,12 +209,13 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
|||||||
//
|
//
|
||||||
// Setup outgoing proxy with relevant properties.
|
// Setup outgoing proxy with relevant properties.
|
||||||
//
|
//
|
||||||
outgoing.host = this.target.host;
|
outgoing.host = this.target.host;
|
||||||
outgoing.port = this.target.port;
|
outgoing.hostname = this.target.hostname;
|
||||||
outgoing.agent = this.target.agent;
|
outgoing.port = this.target.port;
|
||||||
outgoing.method = req.method;
|
outgoing.agent = this.target.agent;
|
||||||
outgoing.path = req.url;
|
outgoing.method = req.method;
|
||||||
outgoing.headers = req.headers;
|
outgoing.path = req.url;
|
||||||
|
outgoing.headers = req.headers;
|
||||||
|
|
||||||
//
|
//
|
||||||
// If the changeOrigin option is specified, change the
|
// If the changeOrigin option is specified, change the
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user