Skip to content

Commit

Permalink
Add CSRF_TRUSTED_ORIGINS config
Browse files Browse the repository at this point in the history
I'm getting a 403 CSRF failed error in the admin page for econplayground
when making a POST. It looks like we may require a new setting, as of
django 4.0, to allow for CSRF forms to work.

If this fixes the problem, I will add it to ctlsettings.

* https://forum.djangoproject.com/t/csrf-verification-error-for-django-admin-login/11785/7
* https://docs.djangoproject.com/en/4.2/ref/settings/#csrf-trusted-origins
  • Loading branch information
nikolas committed Jan 23, 2024
1 parent b1b9a98 commit b4e2702
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions econplayground/settings_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,10 @@
'lti_provider.auth.LTIBackend',
]

CSRF_TRUSTED_ORIGINS = [
'https://*.ctl.columbia.edu',
]

LTI_TOOL_CONFIGURATION = {
'title': 'EconPractice',
'description': 'Interactive economics graphs',
Expand Down

0 comments on commit b4e2702

Please sign in to comment.