Skip to content

Commit

Permalink
fix: profile url when accessed from other MFEs
Browse files Browse the repository at this point in the history
In the account MFE (for instance), the top-right menu link to the
profile MFE was incorrect, as it included an "undefined/" portion.

(cherry picked from commit 7403e5e)
  • Loading branch information
regisb authored and navinkarkera committed Mar 24, 2023
1 parent 0420c14 commit 7aeb82a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tutormfe/patches/openedx-lms-development-settings
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ CSRF_TRUSTED_ORIGINS.append("{{ MFE_HOST }}:{{ app["port"] }}")
# https://openedx.github.io/frontend-platform/module-Config.html
MFE_CONFIG = {
"BASE_URL": "{{ MFE_HOST }}",
{%- if MFE_PROFILE_MFE_APP %}
"ACCOUNT_PROFILE_URL": "http://{{ MFE_HOST }}:{{ MFE_PROFILE_MFE_APP["port"] }}",
{%- endif %}
"CREDENTIALS_BASE_URL": "/csrf/api/v1/token",
"DISCOVERY_API_BASE_URL": "{% if DISCOVERY_HOST is defined %}http://{{ DISCOVERY_HOST }}:8381{% endif %}",
"FAVICON_URL": "http://{{ LMS_HOST }}/favicon.ico",
Expand Down
3 changes: 3 additions & 0 deletions tutormfe/patches/openedx-lms-production-settings
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ ALLOWED_HOSTS.append("{{ MFE_HOST }}")
# Start of Dynamic config API settings
MFE_CONFIG = {
"BASE_URL": "{{ MFE_HOST }}",
{%- if MFE_PROFILE_MFE_APP %}
"ACCOUNT_PROFILE_URL": "{% if ENABLE_HTTPS %}https://{% else %}http://{% endif %}{{ MFE_HOST }}/{{ MFE_PROFILE_MFE_APP["name"] }}",
{%- endif %}
"CREDENTIALS_BASE_URL": "/csrf/api/v1/token",
"DISCOVERY_API_BASE_URL": "{% if DISCOVERY_HOST is defined %}{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ DISCOVERY_HOST }}{% endif %}",
"FAVICON_URL": "{% if ENABLE_HTTPS %}https{% else %}http{% endif %}://{{ LMS_HOST }}/favicon.ico",
Expand Down

0 comments on commit 7aeb82a

Please sign in to comment.