-
Notifications
You must be signed in to change notification settings - Fork 1
Verawood #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
BetoFandino
wants to merge
7
commits into
main
Choose a base branch
from
verawood
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Verawood #38
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
3d39923
feat: support to verawood
BetoFandino ace5ab4
feat: add enabled frontend apps to LMS path routing in Caddy
BetoFandino e907d87
feat: serve frontend-site bundles on LMS domain for BY_PATH hosting
BetoFandino a92694d
fix: include *-main webpack chunks in frontend-site LMS asset proxy
BetoFandino 42f7d14
feat: upgraded version in changelog
BetoFandino f1f1cd0
fix: mfe dependecies
BetoFandino 11885e7
feat: updated dependencies rev
BetoFandino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
tutormfe_extensions/patches/caddyfile-frontend-site-assets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| {%- if MFE_EXTENSIONS_BY_PATH and get_frontend_apps() %} | ||
| # Frontend-site bundles (e.g. runtime.*.js) are served from /openedx/dist/site at the | ||
| # MFE root. When hosting by path on the LMS domain, proxy those asset paths to mfe. | ||
| @mfe_frontend_site_assets { | ||
| path_regexp assets ^/(runtime|app|cssLayerOrder|[0-9]+|[a-z0-9-]+-main)\.[a-f0-9]+\.(js|css)$ | ||
| } | ||
| handle @mfe_frontend_site_assets { | ||
| reverse_proxy mfe:8002 { | ||
| header_up Host {host} | ||
| } | ||
| } | ||
| {%- endif %} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| {{ patch("caddyfile-mfe-by-path") }} | ||
| {{ patch("caddyfile-frontend-site-assets") }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would need to test it first, but at first glance I have some doubts about this configuration.
Correct me if I’m wrong, but after reviewing this issue overhangio/tutor-mfe#285
I don’t see anything that would require changing the behavior of the main Caddy to serve those assets. My understanding is that, even though the files are now served from
/openedx/dist/site, they should still follow the same logic as before, so the request should continue reaching the MFE Caddyfile (mfe:8002), and that Caddyfile should handle looking for the files in the corresponding path.Did you try
mfe-extensionwithout this change? If so, what error do you get?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In legacy MFEs those assets live under /{app}/ and /instructor-dashboard/* → mfe:8002 is enough.
For frontend-site apps, webpack still emits root-level bundles (/runtime..js, /instructor-dashboard-main..js). I tested without this patch: HTML under /instructor-dashboard/ works, but /runtime.*.js returns 404 from the LMS (never hits mfe:8002). That matches a blank instructor dashboard. This patch only proxies those root asset paths to mfe:8002 when BY_PATH + frontend apps are enabled.