|
|
@@ -1,6 +1,9 @@
|
|
1
|
1
|
package network
|
|
2
|
2
|
|
|
3
|
|
-import "net/http"
|
|
|
3
|
+import (
|
|
|
4
|
+ "crypto/tls"
|
|
|
5
|
+ "net/http"
|
|
|
6
|
+)
|
|
4
|
7
|
|
|
5
|
8
|
type networkHTTPTransport struct {
|
|
6
|
9
|
userAgent string
|
|
|
@@ -12,3 +15,11 @@ func (n networkHTTPTransport) RoundTrip(req *http.Request) (*http.Response, erro
|
|
12
|
15
|
|
|
13
|
16
|
return n.next.RoundTrip(req) //nolint: wrapcheck
|
|
14
|
17
|
}
|
|
|
18
|
+
|
|
|
19
|
+func (n networkHTTPTransport) TrustTLS() {
|
|
|
20
|
+ tr := n.next.(*http.Transport)
|
|
|
21
|
+ if tr.TLSClientConfig == nil {
|
|
|
22
|
+ tr.TLSClientConfig = &tls.Config{}
|
|
|
23
|
+ }
|
|
|
24
|
+ tr.TLSClientConfig.InsecureSkipVerify = true
|
|
|
25
|
+}
|