From 8c865f3ce89348cbb9b3f4c2dd31e9767ab0a01a Mon Sep 17 00:00:00 2001
From: Paul <paulsb@gmail.com>
Date: Sat, 9 Feb 2019 07:58:31 +0200
Subject: [PATCH] Fix metrics auth token detection (#6006)

Signed-off-by: Pauls Barkans <paulsb@gmail.com>
---
 routers/metrics.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/routers/metrics.go b/routers/metrics.go
index e70918f068..78abd4a785 100644
--- a/routers/metrics.go
+++ b/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