-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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) | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
indexzero
Contributor
|
||
// | ||
// Open new HTTP request to internal resource with will act | ||
// as a reverse proxy pass | ||
|
3 comments
on commit 65b7872
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, this needs to be configurable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agreee. I have reverted it in my branch but that's not a long term solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is totally necessary - especially if you're proxying to another proxy that uses the host header! But it should be optional.
This is actually breaking my code sine I expect the original host in there. Why is it necessary?
Is there another way to get to the original hostname? I don't see it in the 'x-forwarded' headers either.