Plugins: Fix circular reference in customOptions leading to MarshalJSON errors (#62328)
* Plugins: test ds.JsonData.MarshalJSON() * CustomOptions: copy to avoid cyclic marshal
This commit is contained in:
@@ -417,7 +417,10 @@ func (s *Service) httpClientOptions(ctx context.Context, ds *datasources.DataSou
|
||||
if ds.JsonData != nil {
|
||||
opts.CustomOptions = ds.JsonData.MustMap()
|
||||
// allow the plugin sdk to get the json data in JSONDataFromHTTPClientOptions
|
||||
opts.CustomOptions["grafanaData"] = ds.JsonData.MustMap()
|
||||
opts.CustomOptions["grafanaData"] = make(map[string]interface{})
|
||||
for k, v := range opts.CustomOptions {
|
||||
opts.CustomOptions[k] = v
|
||||
}
|
||||
}
|
||||
if ds.BasicAuth {
|
||||
password, err := s.DecryptedBasicAuthPassword(ctx, ds)
|
||||
|
||||
Reference in New Issue
Block a user