Fix deleting prom rules endpoints via ds_proxy (#33491)

This commit is contained in:
Sofia Papagiannaki
2021-04-29 10:20:51 +03:00
committed by GitHub
parent e977085933
commit fcd674ec58
2 changed files with 6 additions and 3 deletions
+3
View File
@@ -290,6 +290,9 @@ func (proxy *DataSourceProxy) validateRequest() error {
if proxy.ctx.Req.Request.Method == "PUT" {
return errors.New("non allow-listed PUTs not allowed on proxied Prometheus datasource")
}
if proxy.ctx.Req.Request.Method == "POST" {
return errors.New("non allow-listed POSTs not allowed on proxied Prometheus datasource")
}
}
return nil