mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Fix deleting prom rules endpoints via ds_proxy (#33491)
This commit is contained in:
parent
e977085933
commit
fcd674ec58
@ -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
|
||||
|
@ -31,17 +31,17 @@
|
||||
},
|
||||
{
|
||||
"method": "GET",
|
||||
"path": "api/v1/rules",
|
||||
"path": "/rules",
|
||||
"reqRole": "Viewer"
|
||||
},
|
||||
{
|
||||
"method": "POST",
|
||||
"path": "api/v1/rules",
|
||||
"path": "/rules",
|
||||
"reqRole": "Editor"
|
||||
},
|
||||
{
|
||||
"method": "DELETE",
|
||||
"path": "api/v1/rules",
|
||||
"path": "/rules",
|
||||
"reqRole": "Editor"
|
||||
}
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user