From 64d341e307e2e729e11b5697b1f831a52f506683 Mon Sep 17 00:00:00 2001 From: mountain Date: Tue, 16 Jul 2024 19:55:33 +0900 Subject: [PATCH] =?UTF-8?q?insecure=20option=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- reflect_config.go | 4 ---- 1 file changed, 4 deletions(-) diff --git a/reflect_config.go b/reflect_config.go index e893a20..383820b 100644 --- a/reflect_config.go +++ b/reflect_config.go @@ -2,7 +2,6 @@ package gocommon import ( "crypto/md5" - "crypto/tls" "encoding/hex" "encoding/json" "fmt" @@ -94,12 +93,9 @@ func LoadConfig[T any](outptr *T) error { h.Write([]byte(subpath)) at := hex.EncodeToString(h.Sum(nil)) - http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{InsecureSkipVerify: true} - req, _ := http.NewRequest("GET", configfilepath, nil) req.Header.Add("User-Agent", "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36 Edg/111.0.1661.51") req.Header.Add("As-X-UrlHash", at) - http.DefaultClient.Transport.(*http.Transport).TLSClientConfig.InsecureSkipVerify = true resp, err := http.DefaultClient.Do(req) if err != nil {