Add CSRF_TRUSTED_ORIGINS to local.py

Addresses #1350
This commit is contained in:
Peter Pfeufer 2022-07-31 16:43:57 +02:00
parent be2fbe862b
commit 17a6b3225e
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27

View File

@ -13,6 +13,12 @@ STATIC_ROOT = "/var/www/{{ project_name }}/static/"
# in page titles and the site header. # in page titles and the site header.
SITE_NAME = '{{ project_name }}' SITE_NAME = '{{ project_name }}'
# This is your websites URL, set it accordingly
SITE_URL = "https://example.com"
# Django security
CSRF_TRUSTED_ORIGINS = [SITE_URL]
# Change this to enable/disable debug mode, which displays # Change this to enable/disable debug mode, which displays
# useful error messages but can leak sensitive data. # useful error messages but can leak sensitive data.
DEBUG = False DEBUG = False