diff options
Diffstat (limited to 'src/http/mod.rs')
| -rw-r--r-- | src/http/mod.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/http/mod.rs b/src/http/mod.rs index 7ca4875..16ff6b1 100644 --- a/src/http/mod.rs +++ b/src/http/mod.rs @@ -223,6 +223,11 @@ fn dispatch(state: &State, req: &Req) -> Res { ("GET", ["login"]) => return routes::login_form(state, req), ("POST", ["login"]) => return routes::login(state, req), ("GET", ["healthz"]) => return Res::text(200, "ok\n".into()), + // Metrics are counts only — no package names, no versions, no audit + // detail — and a Prometheus scraper has no session to present. Serving + // them unauthenticated is what makes them scrapeable at all; the bind + // address is loopback by default, which is where that is safe. + ("GET", ["metrics"]) => return routes::metrics(state), _ => {} } |
