-
Notifications
You must be signed in to change notification settings - Fork 49
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
Clean settings and update documentation about proxy headers. #918
Comments
With
In order to enable The cookie settings, |
For I guess with |
@MyPyDavid we can close here, right? |
I learned something today about reverse proxy setups...
is not ideal, because it sets the
Host
header to the original host header.X-Forwarded-For
is the orginal IP andX-Forwarded-Proto
is e.g.https
.Better would be
which sets the
X-Forwarded-Host
header. For this to workUSE_X_FORWARDED_HOST = True
needs to be true in the RDMO settings.For the gunicorn setup it even works when the
proxy_set_header
are omitted, since I introduced https://github.com/rdmorganiser/rdmo/blob/main/rdmo/core/settings.py#L7, and the host when running gunicorn locally is ...localhost
.Django sets the "local" allowed hosts automatically when
DEBUG = True
(https://github.com/rdmorganiser/rdmo/blob/main/rdmo/core/settings.py#L7) so we should remove this settings again.USE_X_FORWARDED_HOST = True
is not needed when running RDMO in Apache so we should not add it to RDMO by default. I think we should add it to rdmo-app and document it properly, but there could be some inconveniences for instances.The text was updated successfully, but these errors were encountered: