mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
app/vmagent: properly set client-side TLS certificates for -remoteWrite.url
. Previously they were mistakenly set as server-side
This commit is contained in:
parent
68928bf3df
commit
b69eb7bf38
1 changed files with 3 additions and 1 deletions
|
@ -169,7 +169,9 @@ func getTLSConfig() (*tls.Config, error) {
|
||||||
ClientSessionCache: tls.NewLRUClientSessionCache(0),
|
ClientSessionCache: tls.NewLRUClientSessionCache(0),
|
||||||
}
|
}
|
||||||
if tlsCertificate != nil {
|
if tlsCertificate != nil {
|
||||||
tlsCfg.Certificates = []tls.Certificate{*tlsCertificate}
|
tlsCfg.GetClientCertificate = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) {
|
||||||
|
return tlsCertificate, nil
|
||||||
|
}
|
||||||
}
|
}
|
||||||
tlsCfg.InsecureSkipVerify = *tlsInsecureSkipVerify
|
tlsCfg.InsecureSkipVerify = *tlsInsecureSkipVerify
|
||||||
return tlsCfg, nil
|
return tlsCfg, nil
|
||||||
|
|
Loading…
Reference in a new issue