fix: update mock config to include scheme for csrf domains (#37120)
Since the scheme must be included for the CSRF_TRUSTED_ORIGINS setting since Django 4.0, this changes the values in the mock.yml configuration files to use the scheme for the values under CSRF_TRUSTED_ORIGINS. We match the values defined under CSRF_TRUSTED_ORIGINS_WITH_SCHEME key. lms/envs/production.py pulls from CSRF_TRUSTED_ORIGINS_WITH_SCHEME in the YAML config to set the CSRF_TRUSTED_ORIGINS setting , but cms/envs/production.py pulls from CSRF_TRUSTED_ORIGINS in the YAML. So, this change fixes the CMS when run with mock.yml.
This commit is contained in:
@@ -246,7 +246,7 @@ CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: .localhost
|
||||
CROSS_DOMAIN_CSRF_COOKIE_NAME: csrftoken
|
||||
CSRF_COOKIE_SECURE: true
|
||||
CSRF_TRUSTED_ORIGINS:
|
||||
- .localhost
|
||||
- https://*.localhost
|
||||
CSRF_TRUSTED_ORIGINS_WITH_SCHEME:
|
||||
- https://*.localhost
|
||||
DATABASES:
|
||||
|
||||
@@ -329,7 +329,7 @@ CROSS_DOMAIN_CSRF_COOKIE_DOMAIN: ''
|
||||
CROSS_DOMAIN_CSRF_COOKIE_NAME: ''
|
||||
CSRF_COOKIE_SECURE: true
|
||||
CSRF_TRUSTED_ORIGINS:
|
||||
- .sandbox.localhost
|
||||
- https://*.sandbox.localhost
|
||||
CSRF_TRUSTED_ORIGINS_WITH_SCHEME:
|
||||
- https://*.sandbox.localhost
|
||||
DASHBOARD_COURSE_LIMIT: 250
|
||||
|
||||
Reference in New Issue
Block a user