corvix.web.app¶
Litestar app serving Corvix dashboard data and UI.
This module is the thin assembly layer: it imports the route handlers from the
focused corvix.web.* modules, wires them into a single Litestar
app with middleware and OpenAPI config, and exposes run() for corvix
serve / corvix-web. The route handlers and their business logic live in:
routes_pages— SPA/index serving, login/logout, session cookiesroutes_api—/api/v1/*JSON handlers and/metricssse— the Server-Sent Events snapshot streamhealth—/api/v1/healthand the/api/healthcontainer aliassnapshot/rule_snippets/actions— API implementation helpersstorage_provider/runtime_config/assets— shared state and assets
Attributes¶
Functions¶
|
Configure structured logging and optional tracing at app startup. |
|
Refuse to start when the secret token env vars are misconfigured. |
|
Run app with uvicorn. |
Module Contents¶
- corvix.web.app._configure_observability() None[source][source]¶
Configure structured logging and optional tracing at app startup.
Runs as a Litestar startup hook so it applies whether the app is launched via
corvix serveor directly throughuvicorn corvix.web.app:app.
- corvix.web.app._validate_secret_config() None[source][source]¶
Refuse to start when the secret token env vars are misconfigured.
get_env_valuecannot tell which ofCORVIX_SECRET_TOKENandCORVIX_SECRET_TOKEN_FILEshould win when both are set. Failing fast here — rather than silently disabling auth at request time — is the preferred fix for the fail-open anti-pattern described in issue #128.