Skip to content

Commit 93496e9

Browse files
author
celer
committed
Fixed issue where 80 was included in the 'Header' field which causes some *cough-cloudfoundry.com* services to have issues
1 parent 9c13ad4 commit 93496e9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,8 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
237237
// don't revert this without documenting it!
238238
//
239239
if (this.changeOrigin) {
240-
outgoing.headers.host = this.target.host + ':' + this.target.port;
240+
var port = (this.target.port-80==0?"":":"+this.target.port);
241+
outgoing.headers.host = this.target.host + port;
241242
}
242243

243244
//

0 commit comments

Comments
 (0)