Pull request: all: rm var shadowing vol. 3
Updates #2803. Squashed commit of the following: commit ce711ae2e08c3714a4e0c6d177c02f7801c05fce Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Mar 11 20:58:40 2021 +0300 all: imp code, docs commit e91094e461893c27eda879b33b5ed2c7085510df Author: Ainar Garipov <A.Garipov@AdGuard.COM> Date: Thu Mar 11 20:42:14 2021 +0300 all: rm var shadowing vol. 3
This commit is contained in:
@@ -290,7 +290,8 @@ func (s *Server) prepareUpstreamSettings() error {
|
||||
|
||||
if len(upstreamConfig.Upstreams) == 0 {
|
||||
log.Info("warning: no default upstream servers specified, using %v", defaultDNS)
|
||||
uc, err := proxy.ParseUpstreamsConfig(
|
||||
var uc proxy.UpstreamConfig
|
||||
uc, err = proxy.ParseUpstreamsConfig(
|
||||
defaultDNS,
|
||||
upstream.Options{
|
||||
Bootstrap: s.conf.BootstrapDNS,
|
||||
@@ -344,7 +345,8 @@ func (s *Server) prepareTLS(proxyConfig *proxy.Config) error {
|
||||
}
|
||||
|
||||
if s.conf.StrictSNICheck {
|
||||
x, err := x509.ParseCertificate(s.conf.cert.Certificate[0])
|
||||
var x *x509.Certificate
|
||||
x, err = x509.ParseCertificate(s.conf.cert.Certificate[0])
|
||||
if err != nil {
|
||||
return fmt.Errorf("x509.ParseCertificate(): %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user