Skip to content

Commit

Permalink
Merge pull request #72 from edx/revert-55-farhan/remove-additional-cs…
Browse files Browse the repository at this point in the history
…rf-variable

Revert "Remove CSRF_TRUSTED_ORIGINS_WITH_SCHEMES variable"
  • Loading branch information
UsamaSadiq authored Dec 3, 2024
2 parents a0c3b1a + 9260dd5 commit f4912fd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions analyticsdataserver/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@
########## EDX ENTERPRISE DATA CONFIGURATION
API_AUTH_TOKEN = 'put-your-api-token-here'
CSRF_COOKIE_SECURE = False
CSRF_TRUSTED_ORIGINS_WITH_SCHEME = [] # just for Django 4.2 upgrade

EXTRA_APPS = []
SESSION_EXPIRE_AT_BROWSER_CLOSE = False
Expand Down
3 changes: 3 additions & 0 deletions analyticsdataserver/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,6 @@ def get_env_setting(setting):

for override, value in DB_OVERRIDES.items():
DATABASES['default'][override] = value

if django.VERSION[0] >= 4: # for greater than django 3.2 use schemes.
CSRF_TRUSTED_ORIGINS = CSRF_TRUSTED_ORIGINS_WITH_SCHEME

0 comments on commit f4912fd

Please sign in to comment.