Skip to content

Commit

Permalink
Adding CSRF trusted hosts to django settings
Browse files Browse the repository at this point in the history
  • Loading branch information
phillybroadbent committed Apr 11, 2024
1 parent 5ebd47e commit e64120a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions lowfat/settings.py
Expand Up @@ -62,6 +62,7 @@
'bootstrap_datepicker_plus',
'constance',
'constance.backends.database',
'corsheaders',
'crispy_forms',
'crispy_bootstrap5',
'dbbackup',
Expand Down Expand Up @@ -90,10 +91,16 @@
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware',
'simple_history.middleware.HistoryRequestMiddleware',
'corsheaders.middleware.CorsMiddleware',
]

ROOT_URLCONF = 'lowfat.urls'

CSRF_TRUSTED_ORIGINS = [
'localhost:8000',
'https://fellows.software.ac.uk',
]

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
Expand Down
5 changes: 3 additions & 2 deletions requirements.txt
Expand Up @@ -11,6 +11,7 @@ Django==4.2
django-appconf==1.0.5
django-bootstrap-datepicker-plus==4.0.0
django-constance==2.9.1
django-cors-headers==4.3.1
django-countries==7.3.2
django-crispy-forms==1.14.0
django-datetime-widget==0.9.3
Expand All @@ -36,7 +37,7 @@ odfpy==1.4.1
openpyxl==3.1.2
pandas==1.4.3
pilkit==2.0
Pillow==10.2.0
pillow==10.2.0
pycparser==2.21
PyJWT==2.4.0
PyPDF2==2.10.3
Expand All @@ -57,4 +58,4 @@ tablib==3.5.0
typing_extensions==4.3.0
urllib3==1.26.12
xlrd==2.0.1
xlwt==1.3.0
xlwt==1.3.0

0 comments on commit e64120a

Please sign in to comment.