fix(web): derive rpc-path correctly for /web and /admin mounts #67
No reviewers
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_collab!67
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_sameh"
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?
Problem
The collab web app's canvas and dashboard 404 on every RPC call (
POST /hero_collab/web/rpc/rpc → 404), and the canvas shows a spurious "Who are you? Pick your identity" prompt even when the user is already logged into the chat view.Root cause
rpc_path_from_base(incrates/hero_collab_admin/src/routes.rs) builds therpc-pathmeta tag the browser uses for RPC. It only stripped a trailing/uisegment. After theui.sock→web.sockrename, this binary serves onweb.sockand hero_router forwardsX-Forwarded-Prefix = /<service>/web. The/websuffix fell through theelsebranch unchanged, so the injected path became/<service>/web/rpc/rpc(404 — web.sock does not proxy RPC) instead of/<service>/rpc/rpc.basePath + '/rpc'.rpc-pathmeta → every call 404'd.Fix
Strip whichever trailing UI mount segment the router forwarded (
/ui,/web, or/admin) before appending/rpc/rpc.Verification (local, dev mode, behind hero_router)
<meta name="rpc-path" content="/hero_collab/rpc/rpc">(was/hero_collab/web/rpc/rpc)POST /hero_collab/rpc/rpc→ 200 through hero_routerBug present identically on
main— will cherry-pick after this merges.