Browse Source

fix secure skip verify

ls 2 years ago
parent
commit
55bcf215dc
1 changed files with 2 additions and 0 deletions
  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