Skip to content

Commit

Permalink
prefer target.hostname over target.host
Browse files Browse the repository at this point in the history
  • Loading branch information
Filirom1 committed Apr 24, 2012
1 parent ed06af9 commit c4d185d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions lib/node-http-proxy/http-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,13 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
//
// Setup outgoing proxy with relevant properties.
//
outgoing.host = this.target.host;
outgoing.port = this.target.port;
outgoing.agent = this.target.agent;
outgoing.method = req.method;
outgoing.path = req.url;
outgoing.headers = req.headers;
outgoing.host = this.target.host;
outgoing.hostname = this.target.hostname;
outgoing.port = this.target.port;
outgoing.agent = this.target.agent;
outgoing.method = req.method;
outgoing.path = req.url;
outgoing.headers = req.headers;

//
// Open new HTTP request to internal resource with will act
Expand Down

0 comments on commit c4d185d

Please sign in to comment.