diff --git a/pkg/api/pluginproxy/ds_proxy.go b/pkg/api/pluginproxy/ds_proxy.go index 0d79fc64356..e60f1f5ca41 100644 --- a/pkg/api/pluginproxy/ds_proxy.go +++ b/pkg/api/pluginproxy/ds_proxy.go @@ -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 diff --git a/public/app/plugins/datasource/prometheus/plugin.json b/public/app/plugins/datasource/prometheus/plugin.json index 79ffb31ed98..3de79425fed 100644 --- a/public/app/plugins/datasource/prometheus/plugin.json +++ b/public/app/plugins/datasource/prometheus/plugin.json @@ -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" } ],