# CSRF_TRUSTED_ORIGINS

* new in Django4: setting CSRF_TRUSTED_ORIGINS needs to be set to schema+host for new CSRF security handling
This commit is contained in:
mpeltriaux 2023-11-28 12:59:40 +01:00
parent 401dc18731
commit 8132427c7c

View File

@ -42,6 +42,10 @@ ALLOWED_HOSTS = [
"localhost",
]
CSRF_TRUSTED_ORIGINS = [
"http://localhost", # not only host but schema (http/s) as well!
]
# Authentication settings
LOGIN_URL = "/login/"