Add hostname to TLS config for SNI support (#4747)
This commit is contained in:
parent
a086ea6989
commit
a21524c6b3
|
@ -80,6 +80,7 @@ func (c *X509Cert) getCert(location string, timeout time.Duration) ([]*x509.Cert
|
|||
}
|
||||
defer ipConn.Close()
|
||||
|
||||
tlsCfg.ServerName = u.Host
|
||||
conn := tls.Client(ipConn, tlsCfg)
|
||||
defer conn.Close()
|
||||
|
||||
|
|
Loading…
Reference in New Issue