Skip to content
Snippets Groups Projects
Unverified Commit 07addf5f authored by Mushtaq Ali's avatar Mushtaq Ali Committed by GitHub
Browse files

Merge pull request #20853 from edx/mushtaq/fix-csrf-referer-not-trusted

Add CSRF_TRUSTED_ORIGINS settings
parents 257406b2 d9a67496
No related branches found
Tags release-2018-06-01-10.30
No related merge requests found
......@@ -2314,6 +2314,7 @@ CSRF_COOKIE_AGE = 60 * 60 * 24 * 7 * 52
# It is highly recommended that you override this in any environment accessed by
# end users
CSRF_COOKIE_SECURE = False
CSRF_TRUSTED_ORIGINS = []
######################### Django Rest Framework ########################
......
......@@ -428,6 +428,9 @@ NOTIFICATION_EMAIL_EDX_LOGO = ENV_TOKENS.get('NOTIFICATION_EMAIL_EDX_LOGO', NOTI
# by end users.
CSRF_COOKIE_SECURE = ENV_TOKENS.get('CSRF_COOKIE_SECURE', False)
# Determines which origins are trusted for unsafe requests eg. POST requests.
CSRF_TRUSTED_ORIGINS = ENV_TOKENS.get('CSRF_TRUSTED_ORIGINS', [])
# Whitelist of domains to which the login/logout pages will redirect.
LOGIN_REDIRECT_WHITELIST = ENV_TOKENS.get('LOGIN_REDIRECT_WHITELIST', LOGIN_REDIRECT_WHITELIST)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment