Skip to content

Commit

Permalink
skip ca
Browse files Browse the repository at this point in the history
  • Loading branch information
miiu96 committed Aug 26, 2024
1 parent 0e39df8 commit 625b61c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/transport/transport.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package transport

import (
"crypto/tls"
"errors"
"fmt"
"net/http"
Expand All @@ -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,
Expand Down

0 comments on commit 625b61c

Please sign in to comment.