fix(ui): inject <base href> to fix preload-scanner 404 on app.js #25

Merged
zaelgohary merged 1 commit from development_fix_voice_base_href into development 2026-05-04 14:14:38 +00:00
Member

Summary

Server-side injects <base href> derived from X-Forwarded-Prefix before any <script>/<link>. The browser preload scanner runs before inline JS, so the existing JS-only base-path fallback was racing against ./app.js resolution and producing 404s when mounted under hero_router.

Closes #26

Changes

  • Added <!-- BASE_HREF --> marker in index.html
  • Substituted the marker in render_index_html from the same prefix used for the meta tag

Test Results

Verified via curl through hero_router: <base href="/hero_voice/ui/"> is in HTML before any resource tag; /hero_voice/ui/app.js returns 200.

## Summary Server-side injects `<base href>` derived from `X-Forwarded-Prefix` before any `<script>`/`<link>`. The browser preload scanner runs before inline JS, so the existing JS-only base-path fallback was racing against `./app.js` resolution and producing 404s when mounted under hero_router. ## Related Issue Closes #26 ## Changes - Added `<!-- BASE_HREF -->` marker in `index.html` - Substituted the marker in `render_index_html` from the same prefix used for the meta tag ## Test Results Verified via curl through hero_router: `<base href="/hero_voice/ui/">` is in HTML before any resource tag; `/hero_voice/ui/app.js` returns 200.
fix(ui): inject <base href> before scripts to fix preload-scanner 404 on app.js
All checks were successful
Build / build (pull_request) Successful in 15m28s
f38a7db413
zaelgohary merged commit 5c26d2ccc3 into development 2026-05-04 14:14:38 +00:00
zaelgohary deleted branch development_fix_voice_base_href 2026-05-04 14:14:38 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_code/hero_voice!25
No description provided.