Loki: do not use the old labels-api (#48185)

* loki: do not use old labels-api

* adjust allowed-url-list

* fixed tests
This commit is contained in:
Gábor Farkas
2022-04-26 11:51:26 +02:00
committed by GitHub
parent fc0346fe5b
commit c73b9d1818
5 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -98,7 +98,7 @@ func (s *Service) CallResource(ctx context.Context, req *backend.CallResourceReq
if req.Method != "GET" {
return fmt.Errorf("invalid resource method: %s", req.Method)
}
if (!strings.HasPrefix(url, "/loki/api/v1/label?")) &&
if (!strings.HasPrefix(url, "/loki/api/v1/labels?")) &&
(!strings.HasPrefix(url, "/loki/api/v1/label/")) && // the `/label/$label_name/values` form
(!strings.HasPrefix(url, "/loki/api/v1/series?")) {
return fmt.Errorf("invalid resource URL: %s", url)