Function build_router

Source
pub async fn build_router(
    cfg: ServerConfig,
    allow_loopback_bypass: bool,
) -> Result<(Router, Arc<AppState>)>
Expand description

Build a ready-to-serve Router from the config. Exposed for tests and embedders that want to run the AuthZEN app inside their own hyper server.

allow_loopback_bypass: when true, a config with auth disabled may be served on a non-loopback listener (intended only for tests and embedders behind a trusted reverse proxy). Production callers should pass false so the security guard fires.