Auth for metrics, removed unwanted metrics and fixed tests.

This commit is contained in:
2026-03-02 22:30:15 +01:00
parent 6ca3fb8701
commit 8c9cd96213
5 changed files with 41 additions and 43 deletions

View File

@@ -25,7 +25,7 @@ func Middleware(
return
}
if r.URL.Path == "/healthz" || r.URL.Path == "/metrics" {
if r.URL.Path == "/healthz" {
metrics.Default.ObserveAuth("bypass", "none", "public_endpoint")
next.ServeHTTP(w, r.WithContext(WithRequestContext(r.Context(), authCtx)))
return