Skip to content

Commit

Permalink
ci: fix CSRF_TRUSTED_ORIGINS absent in ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Kl0ven committed Jan 27, 2023
1 parent d64345c commit b27911c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions controller/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,13 @@
STATIC_ROOT = os.path.join(BASE_DIR, "assets/static")
MEDIA_ROOT = os.path.join(BASE_DIR, "assets/media")

if not DEBUG:
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "").split(",")

ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "").split(",")

if os.getenv("CSRF_TRUSTED_ORIGINS", ""):
CSRF_TRUSTED_ORIGINS = os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
else:

if DEBUG:
ALLOWED_HOSTS = ["*"]

# Application definition
Expand Down

0 comments on commit b27911c

Please sign in to comment.