overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

Can't change Site lang in Account MFE #223

Open cmltaWt0 opened 2 months ago

cmltaWt0 commented 2 months ago

I want to link the issue here since the last comment points to a possible Tutor issue.

The current state is the following:

image
regisb commented 2 months ago

When I click "save" the following happens:

  1. POST to <LMS>/i18n/setlang/
  2. redirect to GET <LMS>/ (no idea why)
  3. redirect to GET <LMS>/dashboard (probably because the dashboard is the landing page)
  4. redirect to GET <MFE>/learner-dashboard (probably because the LMS is configured to point to the MFE dashboard)
  5. for some unknown reason this is considered a CORS request, so make OPTION <MFE>/learner-dashboard
  6. CORS request is failing because MFEs are really not supposed to support them.

That thing is a bloody mess. As far as I understand, the issue is with step 2. Why, oh why are we trying to GET /? The CORS issue is a false lead, it's only pointing to a side effect of the actual root cause.