Documentation
¶
Overview ¶
Package web serves the compiled Next.js export of the Cortex web UI from inside the Go binary. It is a local-safe package: it depends only on the standard library and the local web-key verifier, never on PostgreSQL, authz, or the server composition root.
Index ¶
Constants ¶
View Source
const ( // HealthPath is the unauthenticated readiness probe the web shell calls. HealthPath = "/health" // ConfigScriptPath serves the runtime endpoint configuration script. ConfigScriptPath = "/config.js" // APIPrefix is reserved for the API mux; the web handler never answers it. APIPrefix = "/api/" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// ServerURL is the API origin injected as
// window.__CORTEX_WEB_CONFIG__.serverUrl. When empty the generated script
// resolves the page origin at load time, keeping the default same-origin.
ServerURL string
// Assets overrides the embedded export filesystem. Nil selects the
// compiled-in dist tree; tests and alternate compositions may substitute one.
Assets fs.FS
}
Config controls the embedded web handler.
Click to show internal directories.
Click to hide internal directories.