Skip to content

Commit 83be7a9

Browse files
committed
ci: fix CSRF_TRUSTED_ORIGINS absent in ci
1 parent d0328c4 commit 83be7a9

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

controller/settings.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,13 @@
3232
STATIC_ROOT = os.path.join(BASE_DIR, "assets/static")
3333
MEDIA_ROOT = os.path.join(BASE_DIR, "assets/media")
3434

35-
if not DEBUG:
36-
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "").split(",")
35+
36+
ALLOWED_HOSTS = os.getenv("ALLOWED_HOSTS", "").split(",")
37+
38+
if os.getenv("CSRF_TRUSTED_ORIGINS", ""):
3739
CSRF_TRUSTED_ORIGINS = os.getenv("CSRF_TRUSTED_ORIGINS", "").split(",")
38-
else:
40+
41+
if DEBUG:
3942
ALLOWED_HOSTS = ["*"]
4043

4144
# Application definition

0 commit comments

Comments
 (0)