embed: use ServerName on TLS DNS discovery w/o CA file
parent
a31283cf51
commit
487b34d857
|
@ -561,6 +561,9 @@ func getPeerURLsMapAndToken(cfg *config, which string) (urlsmap types.URLsMap, t
|
|||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
if strings.Contains(clusterStr, "https://") && cfg.peerTLSInfo.CAFile == "" {
|
||||
cfg.peerTLSInfo.ServerName = cfg.DnsCluster
|
||||
}
|
||||
urlsmap, err = types.NewURLsMap(clusterStr)
|
||||
// only etcd member must belong to the discovered cluster.
|
||||
// proxy does not need to belong to the discovered cluster.
|
||||
|
|
Loading…
Reference in New Issue