Skip to content

runtimeConfigJsonUrl does not support relative URLs #208

@arbrandes

Description

@arbrandes

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.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions