mirror of
https://github.com/grafana/grafana.git
synced 2024-11-30 20:54:22 -06:00
6415d2802e
* Introduce PluginRequestValidator abstraction with a NoOp implementation * Update PluginRequestValidator abstraction to use the dsURL instead * Inject PluginRequestValidator into the HTTPServer and validate requests going through data source proxy * Inject PluginRequestValidator into the BackendPluginManager and validate requests going through it * Validate requests going through QueryMetrics & QueryMetricsV2 * Validate BackendPluginManager health requests * Fix backend plugins manager tests * Validate requests going through alerting service * Fix tests * fix tests * goimports Co-authored-by: Leonard Gram <leo@xlson.com>
13 lines
271 B
Go
13 lines
271 B
Go
package models
|
|
|
|
import (
|
|
"net/http"
|
|
)
|
|
|
|
type PluginRequestValidator interface {
|
|
// Validate performs a request validation based
|
|
// on the data source URL and some of the request
|
|
// attributes (headers, cookies, etc).
|
|
Validate(dsURL string, req *http.Request) error
|
|
}
|