Skip to content

Commit

Permalink
Merge pull request #353 from maykinmedia/debug/amsterdam
Browse files Browse the repository at this point in the history
🔧 Add config option for USE_X_FORWARDED_HOST
  • Loading branch information
annashamray authored Mar 1, 2024
2 parents b5925e8 + 525c661 commit 6b993f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
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

0 comments on commit 6b993f9

Please sign in to comment.