From 65b7872e6ad433deae4de823c63629cb341bd649 Mon Sep 17 00:00:00 2001 From: Dominic Tarr Date: Fri, 11 Nov 2011 12:27:21 +1100 Subject: [PATCH] update outgoing.headers.host incase the destination does proxying --- lib/node-http-proxy/http-proxy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node-http-proxy/http-proxy.js b/lib/node-http-proxy/http-proxy.js index 8887972..7279824 100644 --- a/lib/node-http-proxy/http-proxy.js +++ b/lib/node-http-proxy/http-proxy.js @@ -194,7 +194,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) { outgoing.method = req.method; outgoing.path = req.url; 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 // as a reverse proxy pass