Plugins: Modify interface for plugin validations to allow taking PDC into account (#96089)
* 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>
This commit is contained in:
committed by
GitHub
parent
33a53d170b
commit
d192a44469
@@ -94,8 +94,8 @@ func TestDatasourceProxy_proxyDatasourceRequest(t *testing.T) {
|
||||
}}
|
||||
|
||||
p := DataSourceProxyService{
|
||||
PluginRequestValidator: &fakePluginRequestValidator{},
|
||||
pluginStore: pluginStore,
|
||||
DataSourceRequestValidator: &fakeDataSourceRequestValidator{},
|
||||
pluginStore: pluginStore,
|
||||
}
|
||||
|
||||
responseRecorder := httptest.NewRecorder()
|
||||
@@ -129,8 +129,8 @@ func TestDatasourceProxy_proxyDatasourceRequest(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
type fakePluginRequestValidator struct{}
|
||||
type fakeDataSourceRequestValidator struct{}
|
||||
|
||||
func (rv *fakePluginRequestValidator) Validate(_ string, _ *http.Request) error {
|
||||
func (rv *fakeDataSourceRequestValidator) Validate(_ *datasources.DataSource, _ *http.Request) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user