diff --git a/client/transport/transport.go b/client/transport/transport.go index 3b8542e8..fd27f200 100644 --- a/client/transport/transport.go +++ b/client/transport/transport.go @@ -1,6 +1,7 @@ package transport import ( + "crypto/tls" "errors" "fmt" "net/http" @@ -25,6 +26,14 @@ func NewMetricsTransport(statusMetrics core.StatusMetricsHandler) (*metricsTrans return nil, core.ErrNilMetricsHandler } + defaultTransport, ok := http.DefaultTransport.(*http.Transport) + if !ok { + return nil, errors.New("metricsTransport.NewMetricsTransport cannot cast RoundTripper to *http.Transport") + } + defaultTransport.TLSClientConfig = &tls.Config{ + InsecureSkipVerify: true, + } + return &metricsTransport{ statusMetrics: statusMetrics, transport: http.DefaultTransport,