Skip to content
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

🔧 Add config option for USE_X_FORWARDED_HOST #353

Merged
merged 2 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ Other settings
* ``TWO_FACTOR_PATCH_ADMIN``: Whether to use the 2 Factor Authentication login flow for
the admin or not. Default ``True``. You'll probably want to disable this when using OIDC.

* ``USE_X_FORWARDED_HOST``: whether to grab the domain/host from the ``X-Forwarded-Host``
header or not. This header is typically set by reverse proxies (such as nginx,
traefik, Apache...). Default ``False`` - this is a header that can be spoofed and you
need to ensure you control it before enabling this.

Initial superuser creation
--------------------------

Expand Down
1 change: 1 addition & 0 deletions src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

IS_HTTPS = config("IS_HTTPS", not DEBUG)
ALLOWED_HOSTS = config("ALLOWED_HOSTS", default="", split=True)
USE_X_FORWARDED_HOST = config("USE_X_FORWARDED_HOST", default=False)

DATABASES = {
"default": {
Expand Down
Loading