Skip to content

Commit 65b7872

Browse files
committed
update outgoing.headers.host incase the destination does proxying
1 parent f004788 commit 65b7872

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/node-http-proxy/http-proxy.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
194194
outgoing.method = req.method;
195195
outgoing.path = req.url;
196196
outgoing.headers = req.headers;
197-
197+
outgoing.headers.host = this.target.host + (this.target.port == 80 ? '' : ':' + this.target.port)
198198
//
199199
// Open new HTTP request to internal resource with will act
200200
// as a reverse proxy pass

0 commit comments

Comments
 (0)