-
Notifications
You must be signed in to change notification settings - Fork 9
chore: Enterprise Checkout MFE allowed to POST to enterprise-access #168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR updates CSRF trusted origins configuration across multiple services to allow the Enterprise Checkout MFE to make POST requests. The changes standardize the configuration by replacing hardcoded localhost URLs with environment variables and explicitly add the Enterprise Checkout MFE to the allowed origins.
- Replaced hardcoded localhost URLs with environment variables in LMS and CMS CSRF configuration
- Added Enterprise Checkout MFE (localhost:1989) to CORS and CSRF trusted origins in enterprise-access service
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
py_configuration_files/lms.py | Replaced hardcoded localhost URLs with environment variables for CSRF trusted origins |
py_configuration_files/enterprise_access.py | Added Enterprise Checkout MFE to both CORS and CSRF trusted origins |
py_configuration_files/cms.py | Replaced hardcoded localhost URLs with environment variables for CSRF trusted origins |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
'http://localhost:2001', # frontend-app-course-authoring | ||
'http://localhost:1997', # frontend-app-account | ||
'http://localhost:1995', # frontend-app-profile | ||
'http://localhost:1992', # frontend-app-ora | ||
'http://localhost:2002', # frontend-app-discussions | ||
'http://localhost:1991', # frontend-app-admin-portal | ||
'http://localhost:8734', # frontend-app-learner-portal-enterprise | ||
'http://localhost:1989', # frontend-app-enterprise-checkout | ||
'http://localhost:1999', # frontend-app-authn | ||
ACCOUNT_MICROFRONTEND_URL, # frontend-app-account | ||
PROFILE_MICROFRONTEND_URL, # frontend-app-profile | ||
ORA_MICROFRONTEND_URL, # frontend-app-ora | ||
DISCUSSIONS_MICROFRONTEND_URL, # frontend-app-discussions | ||
ENTERPRISE_ADMIN_PORTAL_BASE_URL, # frontend-app-admin-portal | ||
ENTERPRISE_LEARNER_PORTAL_BASE_URL, # frontend-app-learner-portal-enterprise | ||
ENTERPRISE_CHECKOUT_BASE_URL, # frontend-app-enterprise-checkout | ||
AUTHN_MICROFRONTEND_URL, # frontend-app-authn | ||
'http://localhost:18450', # frontend-app-support-tools | ||
'http://localhost:1994', # frontend-app-gradebook | ||
'http://localhost:1996', # frontend-app-learner-dashboard | ||
LEARNING_MICROFRONTEND_URL # frontend-app-learning | ||
WRITABLE_GRADEBOOK_URL, # frontend-app-gradebook | ||
LEARNER_HOME_MICROFRONTEND_URL, # frontend-app-learner-dashboard | ||
LEARNING_MICROFRONTEND_URL, # frontend-app-learning | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes should be a no-op.
# CORS CONFIG | ||
CORS_ORIGIN_WHITELIST = [ | ||
'http://localhost:1989', # frontend-app-enterprise-checkout | ||
'http://localhost:1991', # frontend-app-admin-portal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fixes are in this file only. The other stuff I just added on a whim.
No description provided.