Expand description
Serving the static surfaces of a resolved topology.
One arm in the router asks this: does a static surface own the path? Every discovered
StaticDirectory is answered here, and a surface that did not exist when this file was
written is served because it was discovered, not because an arm was added for it. The
routes the executable answers itself — the JSON index, the OpenAPI document, the Swagger
shell, MCP, the Cockpit — are not dispatched here: they differ in behaviour rather than
in data, and a variant per existing arm would be the match again with more ceremony
(ADR 0013).
The boundary this module defends: only a resolved surface’s own directory is reachable, a request may not walk out of it, and only a closed set of media types is answered.
Structs§
- Static
Surfaces - The static surfaces of a topology, ready to answer.
Functions§
- media_
type - The media type of a file, or
Nonewhen the set does not hold it. - safe_
relative - A request path’s relative part, refused before the filesystem is touched when it holds
anything but the characters a generated report uses, an empty segment,
.or...