Remove indirection in TLS config in TC
@@ -56,9 +56,11 @@ func main() {
if err != nil {
log.Fatalf("Couldn't connect to metric emitter: %s", err)
}
+ tlsConfig := plumbing.NewTLSConfig()
+ tlsConfig.InsecureSkipVerify = conf.SkipCertVerify
transport := &http.Transport{
TLSHandshakeTimeout: 10 * time.Second,
- TLSClientConfig: plumbing.NewTLSConfig(),
+ TLSClientConfig: tlsConfig,
DisableKeepAlives: true,
}
httpClient := &http.Client{
@@ -66,8 +68,6 @@ func main() {
Transport: transport,
}
- transport.TLSClientConfig.InsecureSkipVerify = conf.SkipCertVerify
-
tc := app.NewTrafficController(
conf,
*disableAccessControl,
