Authorize prometheus endpoint with bearer token (#7640)

This commit is contained in:
Praveen raj Mani
2019-09-22 20:27:12 +05:30
committed by kannappanr
parent 4925bc3e80
commit ad75683bde
5 changed files with 20 additions and 35 deletions

View File

@@ -221,7 +221,7 @@ func guessIsMetricsReq(req *http.Request) bool {
return false
}
aType := getRequestAuthType(req)
return aType == authTypeAnonymous &&
return (aType == authTypeAnonymous || aType == authTypeJWT) &&
req.URL.Path == minioReservedBucketPath+prometheusMetricsPath
}