watch: don't set TLSConfig.Address explicitly (#4727)

Don't set the value of TLSConfig.Address explicitly.

This will make sure env vars like CONSUL_TLS_SERVER_NAME are taken into account for the connection. Fixes #4718.
pull/4769/head
Igal Shprincis 6 years ago committed by Hans Hasselberg
parent 8ba1c549a9
commit e1fe3af37f

@ -1475,7 +1475,6 @@ func (c *RuntimeConfig) APIConfig(includeClientCerts bool) (*api.Config, error)
cfg.Scheme = "https"
cfg.TLSConfig.CAFile = c.CAFile
cfg.TLSConfig.CAPath = c.CAPath
cfg.TLSConfig.Address = httpsAddr
if includeClientCerts {
cfg.TLSConfig.CertFile = c.CertFile
cfg.TLSConfig.KeyFile = c.KeyFile

Loading…
Cancel
Save