diff --git a/network/v2/http.go b/network/v2/http.go index 58e6a5e..0504352 100644 --- a/network/v2/http.go +++ b/network/v2/http.go @@ -1,6 +1,9 @@ package network -import "net/http" +import ( + "crypto/tls" + "net/http" +) type networkHTTPTransport struct { userAgent string @@ -12,3 +15,11 @@ func (n networkHTTPTransport) RoundTrip(req *http.Request) (*http.Response, erro return n.next.RoundTrip(req) //nolint: wrapcheck } + +func (n networkHTTPTransport) TrustTLS() { + tr := n.next.(*http.Transport) + if tr.TLSClientConfig == nil { + tr.TLSClientConfig = &tls.Config{} + } + tr.TLSClientConfig.InsecureSkipVerify = true +}