Skip to content

Commit

Permalink
Fix metrics auth token detection (#6006) (#6017)
Browse files Browse the repository at this point in the history
Backport of #6006 

Signed-off-by: Pauls Barkans <[email protected]>
  • Loading branch information
barkap authored and zeripath committed Feb 9, 2019
1 parent b0b574f commit 7f7c451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion routers/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7f7c451

Please sign in to comment.