From 54f902467d388091d0b543b9a5714a9dc880b094 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 12 Mar 2021 10:46:45 +0200 Subject: [PATCH] lib/proxy: there is no need in cloning tlsCfg, which has been created two lines above --- lib/proxy/proxy.go | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/proxy/proxy.go b/lib/proxy/proxy.go index 8222b035f..097fed222 100644 --- a/lib/proxy/proxy.go +++ b/lib/proxy/proxy.go @@ -97,7 +97,6 @@ func (u *URL) NewDialFunc(ac *promauth.Config) (fasthttp.DialFunc, error) { if isTLS { tlsCfg = ac.NewTLSConfig() if !tlsCfg.InsecureSkipVerify && tlsCfg.ServerName == "" { - tlsCfg = tlsCfg.Clone() tlsCfg.ServerName = tlsServerName(proxyAddr) } }