(cherry picked from commit 7a2ab93e7a)
Co-authored-by: Zoltán Bedi <zoltan.bedi@gmail.com>
This commit is contained in:
committed by
GitHub
parent
580030ed9a
commit
3e67fc8670
@@ -253,7 +253,7 @@ func (proxy *DataSourceProxy) validateRequest() error {
|
||||
if proxy.ctx.Req.Request.Method == "PUT" {
|
||||
return errors.New("puts not allowed on proxied Prometheus datasource")
|
||||
}
|
||||
if proxy.ctx.Req.Request.Method == "POST" && !(proxy.proxyPath == "api/v1/query" || proxy.proxyPath == "api/v1/query_range" || proxy.proxyPath == "api/v1/series" || proxy.proxyPath == "api/v1/labels") {
|
||||
if proxy.ctx.Req.Request.Method == "POST" && !(proxy.proxyPath == "api/v1/query" || proxy.proxyPath == "api/v1/query_range" || proxy.proxyPath == "api/v1/series" || proxy.proxyPath == "api/v1/labels" || proxy.proxyPath == "api/v1/query_exemplars") {
|
||||
return errors.New("posts not allowed on proxied Prometheus datasource except on /query, /query_range, /series and /labels")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user