Skip to content

Commit

Permalink
add trusted CSRF origins
Browse files Browse the repository at this point in the history
  • Loading branch information
ax-sc committed Sep 15, 2024
1 parent 4ba77f3 commit 8404c1a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apecs/settings/prod.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
"The 'APECS_ALLOWED_HOSTS' environment variable has to be specified"
)

PREFERRED_SCHEME = "https"
CSRF_TRUSTED_ORIGINS = [f"{PREFERRED_SCHEME}://{host}" for host in ALLOWED_HOSTS]

DATABASES = {
"default": {
"ENGINE": "django.db.backends.postgresql",
Expand Down

0 comments on commit 8404c1a

Please sign in to comment.