-
Notifications
You must be signed in to change notification settings - Fork 34
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
set nginx host with custom port #32
base: master
Are you sure you want to change the base?
Conversation
@giohappy good from my side. |
This issue seems to be wide spread and there are different solutions:
Both would work, but I tend to pick the |
I'd also prefer the changes proposed in GeoNode/geonode#11736, (regardless of being the author of that PR 😜) as they seem adequate for fixing the issue and are just a small modification of a single line in a config file. WRT this PR, I would rather prefer the number of configuration variables for GeoNode to decrease, so adding yet another one is not the way, in my opinion. |
I haven't the opportunity to test the If a custom host is needed it generally means that we are forwarding from anothe gateway / reverse proxy. In that case I guess the expected result is to have the oroginal http header forwarded automatically as is, without having to configure it. The only concern is that |
@giohappy maybe this could be done by just setting
MDN documentation on
Do you know cases other than HTTP 1.0 where |
My comment was to agree with the proposal from @ricardogsilva, but it needs testing. Ok for the required host header. Nginx is designed to cover the edge cases, but I think we can assume the more usual case. |
Nginx configuration uses
$host
variable that doesn't provide custom ports, causing errors withrequest.build_absolute_url
. This PR aims to fix providing also non-standard port specified asHTTP_PORT
/HTTPS_PORT
.Related issues: