Skip to content

Commit 79f973e

Browse files
committed
fix: test CSRF cookie settings
1 parent f30bd1a commit 79f973e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

settings.py

+8
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,11 @@
5656
# https://docs.djangoproject.com/en/3.2/topics/http/sessions/
5757

5858
SESSION_ENGINE = "api.models.session"
59+
60+
# TODO: delete these test settings and/or transfer to py package
61+
# pylint: disable-next=wrong-import-order,wrong-import-position
62+
import json
63+
64+
CSRF_COOKIE_DOMAIN = os.getenv("CSRF_COOKIE_DOMAIN")
65+
CSRF_COOKIE_SAMESITE = os.getenv("CSRF_COOKIE_SAMESITE", "Lax")
66+
CSRF_TRUSTED_ORIGINS = json.loads(os.getenv("CSRF_TRUSTED_ORIGINS", "[]"))

0 commit comments

Comments
 (0)