Description
The runtimeConfig() function in runtime/initialize.js constructs a URL object from runtimeConfigJsonUrl without providing a base URL. This means that if runtimeConfigJsonUrl is set to a relative path (such as /api/config.json, as required by tutor-mfe), the URL constructor throws a TypeError.
Passing window.location.origin as the second argument to the constructor would fix this.
Additionally, the site configs still reference the older mfe_config endpoint rather than the newer frontend_site_config one. These should be updated to match.
Finally, the dev server is hardcoded to listen on apps.local.openedx.io, which is unnecessarily restrictive. Binding to 0.0.0.0 instead would make local development more flexible, especially when serving the frontend from the LMS origin via a relative config URL.
Description
The
runtimeConfig()function inruntime/initialize.jsconstructs aURLobject fromruntimeConfigJsonUrlwithout providing a base URL. This means that ifruntimeConfigJsonUrlis set to a relative path (such as/api/config.json, as required by tutor-mfe), theURLconstructor throws a TypeError.Passing
window.location.originas the second argument to the constructor would fix this.Additionally, the site configs still reference the older
mfe_configendpoint rather than the newerfrontend_site_configone. These should be updated to match.Finally, the dev server is hardcoded to listen on
apps.local.openedx.io, which is unnecessarily restrictive. Binding to0.0.0.0instead would make local development more flexible, especially when serving the frontend from the LMS origin via a relative config URL.