mirror of https://git.sr.ht/~sircmpwn/core-go
auth: allow /query/metrics w/o authentication
This commit is contained in:
parent
b5e0030f8d
commit
39cd24bd09
|
@ -688,7 +688,8 @@ func Middleware(conf ini.File, apiconf string) func(http.Handler) http.Handler {
|
|||
|
||||
return func(next http.Handler) http.Handler {
|
||||
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
if !strings.HasPrefix(r.URL.Path, "/query") {
|
||||
if !strings.HasPrefix(r.URL.Path, "/query") ||
|
||||
r.URL.Path == "/query/metrics" {
|
||||
next.ServeHTTP(w, r)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue