mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 05:02:21 +08:00

* Request interceptor: Do not block PDC * Apply change after feedback received * Add test * Check if secure socks proxy configured for the instance * Apply suggestions from code review * Add dedicated service for datasource request URL validation (#99179) --------- Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
20 lines
502 B
Go
20 lines
502 B
Go
package validations
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/grafana/grafana/pkg/services/datasources"
|
|
)
|
|
|
|
type DataSourceRequestValidator interface {
|
|
// Validate performs a request validation based
|
|
// on the data source URL and some of the request
|
|
// attributes (headers, cookies, etc).
|
|
Validate(ds *datasources.DataSource, req *http.Request) error
|
|
}
|
|
|
|
type DataSourceRequestURLValidator interface {
|
|
// Validate performs a request validation based on the data source URL
|
|
Validate(dsURL string) error
|
|
}
|