mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
Ignore /health endpoint when checking auth
This commit is contained in:
parent
5e8e0fbc80
commit
aea4c80dd7
1 changed files with 3 additions and 0 deletions
|
@ -203,6 +203,9 @@ func handlerWrapper(w http.ResponseWriter, r *http.Request, rh RequestHandler) {
|
|||
|
||||
func checkAuth(w http.ResponseWriter, r *http.Request) bool {
|
||||
path := r.URL.Path
|
||||
if path == "/health" {
|
||||
return true
|
||||
}
|
||||
if path == "/metrics" && len(*metricsAuthKey) > 0 {
|
||||
authKey := r.FormValue("authKey")
|
||||
if *metricsAuthKey == authKey {
|
||||
|
|
Loading…
Reference in a new issue