Skip to content

Conversation

pwnage101
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 19:11
Copy link
Contributor

@Copilot Copilot AI left a 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.

@pwnage101 pwnage101 changed the title chore: Enterprise Checkout MFE allowed to POST to LMS & enterprise-access chore: Enterprise Checkout MFE allowed to POST to enterprise-access Aug 21, 2025
Comment on lines -554 to 566
'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
]
Copy link
Member Author

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.

Comment on lines 74 to 77
# CORS CONFIG
CORS_ORIGIN_WHITELIST = [
'http://localhost:1989', # frontend-app-enterprise-checkout
'http://localhost:1991', # frontend-app-admin-portal
Copy link
Member Author

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.

@brobro10000 brobro10000 merged commit f7f0836 into master Aug 21, 2025
19 checks passed
@brobro10000 brobro10000 deleted the pwnage101/more-checkout-mfe-support branch August 21, 2025 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants