Skip to content

Commit

Permalink
ALLOWED_HOSTS from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
rebkwok committed Aug 4, 2024
1 parent 0662d4e commit eebc6d4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions pipsevents/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,11 @@
else: # pragma: no cover
DEBUG = False

ALLOWED_HOSTS = [
'booking.thewatermelonstudio.co.uk', 'test.pipsevents.co.uk',
'vagrant.pipsevents.co.uk', 'vagrant.booking.thewatermelonstudio.co.uk'
]
DOMAIN = "booking.thewatermelonstudio.co.uk"
ALLOWED_HOSTS = env.list('ALLOWED_HOSTS', default=[DOMAIN])

# https://docs.djangoproject.com/en/4.0/ref/settings/#std:setting-CSRF_TRUSTED_ORIGINS
CSRF_TRUSTED_ORIGINS = ['https://booking.thewatermelonstudio.co.uk']
CSRF_TRUSTED_ORIGINS = [f"https://{host}" for host in ALLOWED_HOSTS]


CSRF_FAILURE_VIEW = "common.views.csrf_failure"
Expand Down Expand Up @@ -511,10 +510,6 @@ def show_toolbar(request): # pragma: no cover
NOTICES_COLOUR="rgb(240, 139, 165)"
NOTICES_SAFE = True


DOMAIN = "booking.thewatermelonstudio.co.uk"


# STRIPE
PAYMENT_METHOD = env("PAYMENT_METHOD")

Expand Down

0 comments on commit eebc6d4

Please sign in to comment.