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
Signed-off-by: Bharadwajshivam28 <[email protected]>
  • Loading branch information
Bharadwajshivam28 committed Oct 10, 2024
1 parent c472ed4 commit 75b8a9f
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 75b8a9f

Please sign in to comment.