Skip to content

Commit

Permalink
Fix CSRF validation by setting CSRF_TRUSTED_ORIGINS (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrgn authored Nov 3, 2024
1 parent a06ccdd commit b799117
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions config/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def require_env(name):

if DEBUG is False:
ALLOWED_HOSTS = [env("ALLOWED_HOST", "reservations.coredump.ch")]
CSRF_TRUSTED_ORIGINS = [f"https://{host}" for host in ALLOWED_HOSTS]
else:
ALLOWED_HOSTS = []

Expand Down

0 comments on commit b799117

Please sign in to comment.