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.
This commit is contained in:
Igal Shprincis 2018-10-08 23:01:17 +03:00 committed by Hans Hasselberg
parent 8ba1c549a9
commit e1fe3af37f

View File

@ -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