Skip to content

Commit

Permalink
make 'USE_X_FORWARDED_HOST' configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
duncte123 committed Mar 13, 2024
1 parent fc9c59f commit eb221c7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions example_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
'127.0.0.1',
'your.domain.name',
]
USE_X_FORWARDED_HOST = True

TRACKER_HAS_CELERY = False
TRACKER_PRIVACY_POLICY_URL = ''
Expand Down
1 change: 1 addition & 0 deletions local_statics.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os

ALLOWED_HOSTS = ['localhost']
USE_X_FORWARDED_HOST = True

TRACKER_HAS_CELERY = False
TRACKER_PRIVACY_POLICY_URL = ''
Expand Down
3 changes: 2 additions & 1 deletion settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
DEBUG = local.DEBUG

ALLOWED_HOSTS = local.ALLOWED_HOSTS
CSRF_TRUSTED_ORIGINS = local.ALLOWED_HOSTS

DOMAIN = local.DOMAIN
PAYPAL_DOMAIN = local.PAYPAL_DOMAIN
Expand All @@ -38,7 +39,7 @@

SITE_PREFIX = local.SITE_PREFIX

USE_X_FORWARDED_HOST = True
USE_X_FORWARDED_HOST = local.USE_X_FORWARDED_HOST

LOGIN_URL = SITE_PREFIX + 'user/login/'
LOGIN_REDIRECT_URL = SITE_PREFIX + 'user/index/'
Expand Down

0 comments on commit eb221c7

Please sign in to comment.