Skip to main content

disabled_router

Function disabled_router 

Source
pub fn disabled_router(path: &str) -> Router
Expand description

Router fragment answering the MCP path with 404 when the feature is off or admin.mcp.enabled is false (the /api/debug/* convention: never advertise a disabled surface).

The warning naming the key fires once per process, not once per request: this route answers before any credential is checked, so a per-request log would let anyone who can reach the admin listener drive unbounded WARN volume. The first hit carries the whole diagnosis (and build_router already logs the disabled state at startup); the rest is noise.