Skip to content

Make MFE base URLs site‑aware via Site Configuration #37514

@anfbermudezme

Description

@anfbermudezme

Context:

There’s a draft PR to read LEARNING_MICROFRONTEND_URL from Site Configuration (with a Django settings fallback) across learning URLs and email tasks. The goal is to enable per‑Site (multi‑tenant / multi‑stage) overrides without deploy‑time env changes. #37504

Problem statement

Today, many places in edx-platform read MFE base URLs directly from Django settings (e.g., settings.LEARNING_MICROFRONTEND_URL). That makes multi‑site setups brittle: changing the MFE host for one site often requires redeploying or introducing bespoke settings plumbing. The draft PR (#37504) addresses this for Learning links and emails; this RFC proposes generalizing the approach to all MFE base URLs.

Proposal

  • Replace direct reads of settings.<SOME_MFE_URL> with:
    configuration_helpers.get_value("<SOME_MFE_URL>", settings.<SOME_MFE_URL>)
    so operators may set a per‑Site override in Site Configuration; otherwise we fall back to the existing Django setting.

Candidate keys:

  • LEARNING_MICROFRONTEND_URL
  • PROFILE_MICROFRONTEND_URL
  • ORDER_HISTORY_MICROFRONTEND_URL
  • AUTHN_MICROFRONTEND_URL
  • EXAMS_DASHBOARD_MICROFRONTEND_URL
  • CATALOG_MICROFRONTEND_URL
  • COURSE_AUTHORING_MICROFRONTEND_URL
  • LEARNER_HOME_MICROFRONTEND_URL
  • ACCOUNT_MICROFRONTEND_URL
  • WRITABLE_GRADEBOOK_URL
  • ENTERPRISE_LEARNER_PORTAL_BASE_URL

Why this is viable

  • Aligns with how we already expect MFEs to be deployed (multi‑site, different hosts); the README even lists the override setting names we lean on in dev.
  • Operator ergonomics: Site admins can change a single site’s MFE host without touching global settings or rebuilt containers.
  • Low risk: Read‑only lookups.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions