Skip to content

fix(ui): rewrite all asset paths in index.html with ROOT_PATH (#99)#100

Merged
rbardaji merged 4 commits intomainfrom
fix/99-rewrite-asset-paths-root-path
Apr 8, 2026
Merged

fix(ui): rewrite all asset paths in index.html with ROOT_PATH (#99)#100
rbardaji merged 4 commits intomainfrom
fix/99-rewrite-asset-paths-root-path

Conversation

@rbardaji
Copy link
Copy Markdown
Collaborator

@rbardaji rbardaji commented Apr 8, 2026

Summary

Fixes #99 — The built React index.html had hardcoded /ui/... asset paths (favicon, JS bundles, CSS, manifest). Behind a reverse proxy with a prefix like /ep-api, the browser requested /ui/static/js/main.xxx.js but the resource was only available at /ep-api/ui/static/js/main.xxx.js.

Changes

  • entrypoint.sh: Replaced the specific config.js sed rewrite with a generic one that rewrites all "/ui/ references to "${ROOT_PATH}/ui/ in the built index.html.

Result

All asset paths in index.html now include the ROOT_PATH prefix:

href="/ep-api/ui/favicon.ico"
href="/ep-api/ui/logo192.png"
href="/ep-api/ui/manifest.json"
src="/ep-api/ui/config.js"
src="/ep-api/ui/static/js/main.20709373.js"
href="/ep-api/ui/static/css/main.4159b21f.css"

Test plan

  • All 1011 tests pass
  • curl localhost:8002/ep-api/ui/ → 200
  • curl localhost:8002/ep-api/ui/static/js/main.20709373.js → 200
  • curl localhost:8002/ep-api/ui/static/css/main.4159b21f.css → 200
  • curl localhost:8002/ep-api/ui/favicon.ico → 200
  • curl localhost:8002/ep-api/health → 200

@rbardaji rbardaji merged commit 6eb5a3a into main Apr 8, 2026
1 check passed
@rbardaji rbardaji deleted the fix/99-rewrite-asset-paths-root-path branch April 8, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React asset paths in index.html not rewritten with ROOT_PATH prefix

1 participant