Browse Source

Fix metrics auth token detection (#6006)

Signed-off-by: Pauls Barkans <paulsb@gmail.com>
release/v1.8
Paul 4 years ago
committed by techknowlogick
parent
commit
8c865f3ce8
  1. 2
      routers/metrics.go

2
routers/metrics.go

@ -17,7 +17,7 @@ func Metrics(ctx *context.Context) {
promhttp.Handler().ServeHTTP(ctx.Resp, ctx.Req.Request)
return
}
header := ctx.Header().Get("Authorization")
header := ctx.Req.Header.Get("Authorization")
if header == "" {
ctx.Error(401)
return

Loading…
Cancel
Save