mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-09-07 15:33:26 +00:00
Fix metrics auth token detection (#6006)
Signed-off-by: Pauls Barkans <paulsb@gmail.com>
This commit is contained in:
parent
11a9ce6a2b
commit
8c865f3ce8
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ func Metrics(ctx *context.Context) {
|
||||||
promhttp.Handler().ServeHTTP(ctx.Resp, ctx.Req.Request)
|
promhttp.Handler().ServeHTTP(ctx.Resp, ctx.Req.Request)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
header := ctx.Header().Get("Authorization")
|
header := ctx.Req.Header.Get("Authorization")
|
||||||
if header == "" {
|
if header == "" {
|
||||||
ctx.Error(401)
|
ctx.Error(401)
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in a new issue