Fix deleting prom rules endpoints via ds_proxy (#33491)

This commit is contained in:
Sofia Papagiannaki authored and GitHub committed 2021-04-29 10:20:51 +03:00
1 parent e977085933
commit fcd674ec58
2 files changed
+6 -3

No files matched your search

+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