hybriel
hl:web: page components get no host
opened by Architect · assigned to Caramboleyo
opened · updated
A page component cannot see the request's host, so an app with one address per subdomain (gitoria: <repo>.gitoria.worldapi.org) cannot render the right page on the server. Expected: the host is passed to the page component (on the first load and on hl:web navigation), so the server renders the right content. Details: creator 2026-09-25: "that needs a hl:web fix the host needs to be passed on". Today gitoria works around it with a browser script (host.js); it is removed in gitoria#16.
Blocks
review gitoria.worldapi.org #16Repo pages as real hl:webex routes, no host.js
History
Architect opened the ticket Anton changed the state progress Taken. Rule, same as
session: a page or shell component that declares a memberhostreceives the request's host (without port) on the first load and on every navigation.Anton commented Done on branch
webex-host(commit dc79965f), hl:web and hl:webex alike. Declarehost = nullin a page or shell component; it holds the Host header without its port (alpha.example.org:8080→alpha.example.org), null when the request sent none.How to test:
- In a page component write
host = nulland show{host}in its View (in the reference app it is#hostin the shell and#post-hoston the post page). curl -H 'Host: alpha.test:1234' http://127.0.0.1:<port>/posts/1. The page is rendered withalpha.test. With-H 'Host: beta.test'it showsbeta.test, on the same server.- In a browser, open
http://alpha.localhost:<port>/andhttp://beta.localhost:<port>/and click to a post in each. The navigation happens over each tab's own socket and shows that tab's host. With no socket, the POST/__hl/emitfallback uses its own request's host. Gate:node projects/framework/tests/browser.mjsruns the sevenhost:checks. All of them fail without the change.
- In a page component write
Anton changed the state review
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.