-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
registerWebInterface() redirect ignores X-Forwarded-Port header #1490
Comments
Currently the server expects the "X-Forwarded-Host" header to be set by the proxy server - if that is given, it will ignore the local port. This works for simple setups, but should definitely be made customizable in the future. Does Heroku set any similar headers, or can it be made to? |
It appears Heroku does not set the Other major HTTP servers appear to support these, but this is probably the cause of the issue. EDIT: Looking at |
#1490 Add support for X-Forwarded-Port header.
Resolved by #1491 |
Minimal case to reproduce,
Requests made to
/users
are redirected to/users/
, however, the redirect includes the port number the vibe app accepted the request on. This is problematic for environments where the internal port number (which vibed is bound to) does not match the external port number (which requests arrive on). For example if the app listens on port 5000, but incoming requests are actually accepted on port 80.I've set up a Heroku app that demonstrates this behavior. Note that it is running on a free dyno, and may take a while to spin up.
Works correctly: http://testrig.herokuapp.com/users/
Problem redirect: http://testrig.herokuapp.com/users
(May redirect to something like: http://testrig.herokuapp.com:48669/users/)
In the case of Heroku, this is particularly problematic as there is no control over what the internal port number is. It is assigned (via environment variable) whenever the app is deployed, and is usually different every time.
The text was updated successfully, but these errors were encountered: