mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 08:36:55 +03:00
Ignore /health endpoint when checking auth
This commit is contained in:
committed by
Aliaksandr Valialkin
parent
5e8e0fbc80
commit
aea4c80dd7
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user