diff --git a/app/vmagent/remotewrite/client.go b/app/vmagent/remotewrite/client.go index 597067007..3f42ac943 100644 --- a/app/vmagent/remotewrite/client.go +++ b/app/vmagent/remotewrite/client.go @@ -169,7 +169,9 @@ func getTLSConfig() (*tls.Config, error) { ClientSessionCache: tls.NewLRUClientSessionCache(0), } if tlsCertificate != nil { - tlsCfg.Certificates = []tls.Certificate{*tlsCertificate} + tlsCfg.GetClientCertificate = func(*tls.CertificateRequestInfo) (*tls.Certificate, error) { + return tlsCertificate, nil + } } tlsCfg.InsecureSkipVerify = *tlsInsecureSkipVerify return tlsCfg, nil