Move the comment to the right line

This commit is contained in:
Chao Xu 2021-04-23 00:05:15 +00:00
parent 75d571a10b
commit 6001c70c72

View File

@ -42,8 +42,6 @@ func (s *SecureServingInfo) NewClientConfig(caCert []byte) (*restclient.Config,
// Do not limit loopback client QPS. // Do not limit loopback client QPS.
QPS: -1, QPS: -1,
Host: "https://" + net.JoinHostPort(host, port), Host: "https://" + net.JoinHostPort(host, port),
// override the ServerName to select our loopback certificate via SNI. This name is also
// used by the client to compare the returns server certificate against.
TLSClientConfig: restclient.TLSClientConfig{ TLSClientConfig: restclient.TLSClientConfig{
CAData: caCert, CAData: caCert,
}, },
@ -57,6 +55,8 @@ func (s *SecureServingInfo) NewLoopbackClientConfig(token string, loopbackCert [
} }
c.BearerToken = token c.BearerToken = token
// override the ServerName to select our loopback certificate via SNI. This name is also
// used by the client to compare the returns server certificate against.
c.TLSClientConfig.ServerName = LoopbackClientServerNameOverride c.TLSClientConfig.ServerName = LoopbackClientServerNameOverride
return c, nil return c, nil