fix(router): use relative URL for service-detail iframe #60
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_router!60
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix-iframe"
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?
The service detail page embeds the target service's UI in an iframe.
Its src was being built by the JS as
BASE_PATH + dataset.uiSrc, butdata-ui-srcwas an absolute URL (built fromhost_url), so theprefix concatenation produced
/http://.... axum then split that asservice_name="http:",webname=""and looked upweb_.sock—resulting in the "Waiting for http:… / Socket 'web_.sock' not found"
spinner page instead of the embedded UI.
Emit
data-ui-srcas a relative path ({group}/{webname}/) so theJS can prepend BASE_PATH uniformly. This also makes the iframe
respect any reverse-proxy prefix.
The "Open in new tab" anchor and badge link still use absolute URLs
because they target
_blankand need a full URL.The service detail page embeds the target service's UI in an iframe. Its src was being built by the JS as `BASE_PATH + dataset.uiSrc`, but `data-ui-src` was an absolute URL (built from `host_url`), so the prefix concatenation produced `/http://...`. axum then split that as `service_name="http:"`, `webname=""` and looked up `web_.sock` — resulting in the "Waiting for http:… / Socket 'web_.sock' not found" spinner page instead of the embedded UI. Emit `data-ui-src` as a relative path (`{group}/{webname}/`) so the JS can prepend BASE_PATH uniformly. This also makes the iframe respect any reverse-proxy prefix. The "Open in new tab" anchor and badge link still use absolute URLs because they target `_blank` and need a full URL.