mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-06 06:02:18 +02:00
Fix metrics auth token detection (#6006)
Signed-off-by: Pauls Barkans <paulsb@gmail.com>
This commit is contained in:
1 parent
11a9ce6a2b
commit
8c865f3ce8
1 file changed
+1
-1
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user