Skip to content

Commit 8c865f3

Browse files
barkaptechknowlogick
authored andcommitted
Fix metrics auth token detection (#6006)
Signed-off-by: Pauls Barkans <[email protected]>
1 parent 11a9ce6 commit 8c865f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ func Metrics(ctx *context.Context) {
1717
promhttp.Handler().ServeHTTP(ctx.Resp, ctx.Req.Request)
1818
return
1919
}
20-
header := ctx.Header().Get("Authorization")
20+
header := ctx.Req.Header.Get("Authorization")
2121
if header == "" {
2222
ctx.Error(401)
2323
return

0 commit comments

Comments
 (0)