Explorar o código

fix secure skip verify

ls %!s(int64=2) %!d(string=hai) anos
pai
achega
55bcf215dc
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      xhttp/client.go

+ 2 - 0
xhttp/client.go

@@ -58,6 +58,8 @@ func newRequest(method, uri string, body io.Reader, opt RequestOption) (res *htt
 			pool := x509.NewCertPool()
 			t.TLSClientConfig = &tls.Config{InsecureSkipVerify: true, Certificates: []tls.Certificate{cert}, RootCAs: pool}
 		}
+	} else {
+		t.TLSClientConfig = &tls.Config{InsecureSkipVerify: true}
 	}
 	c := &http.Client{Transport: t}
 	var req *http.Request