diff --git a/agent/agent.go b/agent/agent.go index e56f3e29fc..c0d840947d 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -742,7 +742,8 @@ func (a *Agent) reloadWatches(cfg *config.RuntimeConfig) error { if a.config.CAFile != "" { config.TLSConfig.CAFile = a.config.CAFile } - config.TLSConfig.Address = addr + // use the original address without the https:// prefix + config.TLSConfig.Address = netaddr.String() } if err := wp.RunWithConfig(addr, config); err != nil {