Documentation
¶
Overview ¶
Package web embeds the relay-ui single-page app and serves it from the control plane.
The built UI dist is fetched at image-build time (a pinned relay-ui release tarball untarred into ./dist; see the Dockerfile and `make ui-fetch`) and baked into the binary via go:embed. The embed lives here in the composition root rather than under app/ so the http API packages stay asset-free.
Serving is same-origin by design: the UI resolves the control API to window.location.origin when VITE_CONTROL_API_URL is unset, so mounting it on the control listener needs no runtime config, no CORS, and no cookie relaxation. Out of scope: a standalone UI port (deliberately folded onto the control plane — disable via RELAY_UI_DISABLE instead).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler serves the embedded SPA: real files (assets, favicon, ...) are served directly; everything else falls back to index.html so client-side routes resolve. Intended to be registered as the control router's NotFound handler, after all API operations — matched API paths never reach it.
Types ¶
This section is empty.