Skip to content

Commit

Permalink
Add CSRF_TRUSTED_ORIGINS config
Browse files Browse the repository at this point in the history
  • Loading branch information
davea committed Dec 7, 2023
1 parent ae8b33a commit 91107b5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion conf/general.yml-example
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@ BUGS_EMAIL: 'example@example.org'
EMAIL_SUBJECT_PREFIX: '[MapIt] '

# Maximum number of results returned from /addressbase API call
ADDRESSBASE_RESULTS_LIMIT: 100
ADDRESSBASE_RESULTS_LIMIT: 100

# List of origins that unsafe (e.g. POST) requests are accepted from
# Should generally just be https://<vhost name>
CSRF_TRUSTED_ORIGINS: []
1 change: 1 addition & 0 deletions labour_project/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ def allow_migrate(self, db, app_label, model_name=None, **hints):
SECRET_KEY = config.get('DJANGO_SECRET_KEY', '')

ALLOWED_HOSTS = ['*']
CSRF_TRUSTED_ORIGINS = config.get('CSRF_TRUSTED_ORIGINS', [])

TIME_ZONE = 'Europe/London'
LANGUAGE_CODE = 'en-gb'
Expand Down

0 comments on commit 91107b5

Please sign in to comment.