Skip to content

Commit

Permalink
feat: Support Django 4.2 in devstack (#34192)
Browse files Browse the repository at this point in the history
With the Django 4.2 upgrade, devstack needs `CSRF_TRUSTED_ORIGINS` for MFEs
to work. This PR is probably not a complete list, but gets us started.

Ticket: #34180
  • Loading branch information
timmc-edx authored Feb 6, 2024
1 parent d65841a commit 5e732f9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cms/envs/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
############################ AI_TRANSLATIONS ##################################
AI_TRANSLATIONS_API_URL = 'http://localhost:18760/api/v1'

############################ CSRF ##################################

# MFEs that will call this service in devstack
CSRF_TRUSTED_ORIGINS = [
'http://localhost:3001', # frontend-app-library-authoring
'http://localhost:2001', # frontend-app-course-authoring
]

#################### Event bus backend ########################

EVENT_BUS_PRODUCER = 'edx_event_bus_redis.create_producer'
Expand Down
10 changes: 10 additions & 0 deletions lms/envs/devstack.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,16 @@ def should_show_debug_toolbar(request): # lint-amnesty, pylint: disable=missing
############################ AI_TRANSLATIONS ##################################
AI_TRANSLATIONS_API_URL = 'http://localhost:18760/api/v1'

############################ CSRF ##################################

# MFEs that will call this service in devstack
CSRF_TRUSTED_ORIGINS = [
'http://localhost:2000', # frontend-app-learning
'http://localhost:1997', # frontend-app-account
'http://localhost:1995', # frontend-app-profile
]


################# New settings must go ABOVE this line #################
########################################################################
# See if the developer has any local overrides.
Expand Down

0 comments on commit 5e732f9

Please sign in to comment.