Skip to content

Commit

Permalink
fix: Runtime config in dev mode
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
arbrandes committed Feb 6, 2024
1 parent de52636 commit 0cc2d73
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- [Bugfix] Fix MFE runtime config via site configuration in dev mode (by @arbrandes).
5 changes: 4 additions & 1 deletion tutormfe/templates/mfe/apps/mfe/webpack.dev-tutor.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ module.exports = merge(baseDevConfig, {
// https://github.com/webpack/webpack-dev-server/blob/master/migration-v4.md
allowedHosts: 'all',
proxy: {
'/api/mfe_config/v1' : 'http://{{ LMS_HOST }}:8000',
'/api/mfe_config/v1': {
target: 'http://{{ LMS_HOST }}:8000',
changeOrigin: true,
}
}
},
})
Expand Down

0 comments on commit 0cc2d73

Please sign in to comment.