Skip to content

Commit 5b08860

Browse files
committed
fix: Runtime config in dev mode
MFE runtime configuration was not working properly prior to this. It would always end up querying the `example.com` site configuration. With this change, we force the request origin to always be the LMS host and port, as opposed to something like `apps.local.edly.io:2001`, which would trip up the Django site detection.
1 parent 4a3f4ee commit 5b08860

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- [Bugfix] Fix MFE runtime config via site configuration in dev mode (by @arbrandes).

tutormfe/templates/mfe/apps/mfe/webpack.dev-tutor.config.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ module.exports = merge(baseDevConfig, {
1515
// https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md
1616
allowedHosts: 'all',
1717
proxy: {
18-
'/api/mfe_config/v1' : 'http://{{ LMS_HOST }}:8000',
18+
'/api/mfe_config/v1': {
19+
target: 'http://{{ LMS_HOST }}:8000',
20+
changeOrigin: true,
21+
}
1922
}
2023
},
2124
})

0 commit comments

Comments
 (0)