Skip to content

Commit 8fb0b92

Browse files
committed
fix: CSRF_TRUSTED_ORIGINS
1 parent 20b700c commit 8fb0b92

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

settings.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@
5757

5858
SESSION_ENGINE = "api.models.session"
5959

60-
CSRF_HEADER_NAME = "HTTP_CSRFTOKEN"
60+
CSRF_TRUSTED_ORIGINS = []
61+
if ENV != "local":
62+
CSRF_TRUSTED_ORIGINS.append(SERVICE_SITE_URL.removeprefix("https://"))
63+
print(f"CSRF_TRUSTED_ORIGINS = {CSRF_TRUSTED_ORIGINS}")

0 commit comments

Comments
 (0)