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 90 forks source link

Can't change Site lang in Account MFE #223

Open cmltaWt0 opened 4 days ago

cmltaWt0 commented 4 days 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 4 days ago

When I click "save" the following happens:

  1. POST to /i18n/setlang/
  2. redirect to GET / (no idea why)
  3. redirect to GET /dashboard (probably because the dashboard is the landing page)
  4. redirect to GET /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 /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.