aboutsummaryrefslogtreecommitdiffstats
path: root/routers/metrics.go
diff options
context:
space:
mode:
authorPaul <paulsb@gmail.com>2019-02-09 07:58:31 +0200
committertechknowlogick <matti@mdranta.net>2019-02-09 00:58:31 -0500
commit8c865f3ce89348cbb9b3f4c2dd31e9767ab0a01a (patch)
tree127e8eaf26cc9257b4aa1bcaba2deb403d7fd74d /routers/metrics.go
parent11a9ce6a2bf8fd405b7f30b4f2b53b031a7da50f (diff)
downloadgitea-8c865f3ce89348cbb9b3f4c2dd31e9767ab0a01a.tar.gz
gitea-8c865f3ce89348cbb9b3f4c2dd31e9767ab0a01a.zip
Fix metrics auth token detection (#6006)
Signed-off-by: Pauls Barkans <paulsb@gmail.com>
Diffstat (limited to 'routers/metrics.go')
-rw-r--r--routers/metrics.go2
1 files changed, 1 insertions, 1 deletions
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