set basic auth for prometheus backend ds requests (#38496)

This commit is contained in:
Domas 2021-08-25 10:05:17 +03:00 committed by GitHub
parent 7751c0a706
commit 2e8a7c1161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -131,7 +131,6 @@ func (s *Service) QueryData(ctx context.Context, req *backend.QueryDataRequest)
if err != nil {
return nil, err
}
client, err := getClient(dsInfo, s)
if err != nil {
return nil, err
@ -183,6 +182,7 @@ func getClient(dsInfo *DatasourceInfo, s *Service) (apiv1.API, error) {
opts := &sdkhttpclient.Options{
Timeouts: dsInfo.HTTPClientOpts.Timeouts,
TLS: dsInfo.HTTPClientOpts.TLS,
BasicAuth: dsInfo.HTTPClientOpts.BasicAuth,
}
customMiddlewares := customQueryParametersMiddleware(plog)