feat(env): add MMPM_UI_BASE_URL for reverse-proxy sub-path deployments#315
feat(env): add MMPM_UI_BASE_URL for reverse-proxy sub-path deployments#315rgrizzell wants to merge 7 commits into
Conversation
Injects the path component as <base href> in index.html at serve time so Angular assets and routing resolve correctly when the UI is hosted at a custom sub-path (e.g. /mmpm) without requiring a rebuild. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@Bee-Mar Saw your comment briefly before it was removed, but if you've already covered this feature, I'll wait for those to make it into a future release. For now my fork will work for me. Thanks! |
|
@rgrizzell I removed my comment since I wasn't sure if the existing environment variables that were added in 4.6.2 were working properly for you (
|
|
@Bee-Mar Yes, working on a fresh install of MMPM 4.6.4. If you could include this as an addition to those two variables, then I would appreciate it. That would allow me to run both MagicMirror and MMPM behind the same Reverse Proxy config. MagicMirror running in server mode and is publicly accessible, but I'm protecting the MMPM UI, API, and Socket with Apache's LDAP Auth. Both run on the same host, so having the MMPM services under a single |
|
@Bee-Mar Apologies, but not quite ready yet. The static files won't work with this patch, but it will if Flask serves the content. I'm going to keep working on this with Claude. |
Introduces a dedicated Flask endpoint that serves window.MMPM_CONFIG as a JavaScript snippet, enabling static file servers to serve index.html without requiring Flask's HTML injection. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…g endpoint Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… href regex Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Prevents caching proxies from serving stale config after mmpm-env.json is edited, preserving the live-reload guarantee. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
From what I understand in the short amount of time I've gotten acquainted with the project, it seems the Angular app is hard-coding the base URL as These changes allow the Angular application to get its configuration from the Flask API layer, static files can still be served by Nginx. Users configure it once. This was quite the rabbit hole for me. I saw you'd been working with Claude, so I threw tokens into the pool for the efforts. Thanks for being super responsive. |

Injects the path component as in index.html at serve time so Angular assets and routing resolve correctly when the UI is hosted at a custom sub-path (e.g. /mmpm) without requiring a rebuild.