hero_router strips trailing slash, breaking iframe relative asset URLs #79
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_router#79
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Symptom
Iframe-served services on hero_router 404 on cold loads. Example:
Hits every iframe island (voice, books, inspector, indexer, embedder, foundry, osis, proxy, biz). Latent for ~3 weeks because warm caches masked it; surfaces on hard refresh.
Root cause
Commit
b4d1aa3(consolidate hero_router crates) rewrotestrip_trailing_slashfrom a transparent middleware URI rewrite to a 301 redirect (crates/hero_router/src/server/routes.rs:1898trailing_slash_redirect). The redirect moves the browser to the slashless URL, breaking relative<script src="./app.js">resolution./hero_voice/ui//hero_voice/ui./app.js→/hero_voice/ui/app.js✓./app.js→/hero_voice/app.js✗ → 404Fix
Restore middleware-style internal rewrite, OR flip redirect to add trailing slash for
/<service>/<webname>paths.