update outgoing.headers.host incase the destination does proxying

This commit is contained in:
Dominic Tarr 2011-11-11 12:27:21 +11:00
parent f004788098
commit 65b7872e6a

View File

@ -194,7 +194,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
outgoing.method = req.method; outgoing.method = req.method;
outgoing.path = req.url; outgoing.path = req.url;
outgoing.headers = req.headers; outgoing.headers = req.headers;
outgoing.headers.host = this.target.host + (this.target.port == 80 ? '' : ':' + this.target.port)
// //
// Open new HTTP request to internal resource with will act // Open new HTTP request to internal resource with will act
// as a reverse proxy pass // as a reverse proxy pass