Malachi. Console. Router
(malachi v0.22.7)
View Source
The console endpoint's request pipeline, in the order a request meets it:
- Header budget. Bandit already bounds the header count and each header's length; the bytes of
names plus values across all headers are bounded here, from the same setting the dashboard
enforces (
Malachi.HTTP.Limits), and past it the answer is the dashboard's 431 problem. - Security headers. The dashboard's set, from
Malachi.Dashboard.SecurityHeaders.headers/3, including its configurable CSP. CORS is left out: it belongs to the dashboard's API routes. - API. A path under
/api/v1goes toMalachi.Console.Api, which authorizes it throughMalachi.Console.Accessand answers every error asapplication/problem+json. It is matched before the static steps, because the single page application fallback answers any extensionless path withindex.html. - Method.
GETandHEADonly; anything else is 405 withAllow. - Bundle. With no bundle built into the release, 503 saying so, never cached.
- Static.
Malachi.Console.Staticanswers everything else from the manifest.
Nothing in this module touches the filesystem.
Summary
Types
@type opts() :: %{ manifest: Malachi.Console.Assets.t(), max_header_bytes: pos_integer() }
What the endpoint hands the router at start: the manifest and the header byte budget.