mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 22:42:11 +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>
28 lines
595 B
Go
28 lines
595 B
Go
package validations
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/grafana/grafana/pkg/services/datasources"
|
|
)
|
|
|
|
type OSSDataSourceRequestValidator struct{}
|
|
|
|
func (*OSSDataSourceRequestValidator) Validate(*datasources.DataSource, *http.Request) error {
|
|
return nil
|
|
}
|
|
|
|
func ProvideValidator() *OSSDataSourceRequestValidator {
|
|
return &OSSDataSourceRequestValidator{}
|
|
}
|
|
|
|
type OSSDataSourceRequestURLValidator struct{}
|
|
|
|
func (*OSSDataSourceRequestURLValidator) Validate(string) error {
|
|
return nil
|
|
}
|
|
|
|
func ProvideURLValidator() *OSSDataSourceRequestURLValidator {
|
|
return &OSSDataSourceRequestURLValidator{}
|
|
}
|