Skip to main content

router

Function router 

Source
pub fn router(cfg: PhronaConfig) -> Router
Expand description

Build the axum router from a PhronaConfig: the search client (profile / timeout / proxies / concurrency), the API key, the max_results clamp, the rate limit and the body-size cap all come from the config.

Protected endpoints (every /v1/* data route plus the Tavily-compatible aliases) run under the per-IP rate limiter; GET /metrics, /health and the frontend stay unauthenticated and unthrottled.