Skip to content

Commit

Permalink
feat: modified tls method to use exisiting behavior and allow tls skip
Browse files Browse the repository at this point in the history
  • Loading branch information
Bharadwajshivam28 committed Oct 10, 2024
1 parent 97eef27 commit fb7ae3b
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,9 @@ func (r RoundTripperRetriever) GetRoundTripper(ctx context.Context, provider met
return nil, err
}

transport := &http.Transport{
TLSClientConfig: &tls.Config{
InsecureSkipVerify: provider.Spec.InsecureSkipTlsVerify,
},
transport := promapi.DefaultRoundTripper.(*http.Transport).Clone()
transport.TLSClientConfig = &tls.Config{
InsecureSkipVerify: provider.Spec.InsecureSkipTlsVerify,
}

return config.NewBasicAuthRoundTripper(secret.User, secret.Password, "", "", transport), nil
Expand Down

0 comments on commit fb7ae3b

Please sign in to comment.