From 043c03264e7242654e9dd2d7c107a404bed44f78 Mon Sep 17 00:00:00 2001 From: dengbiao Date: Sat, 25 May 2024 17:04:05 +0800 Subject: [PATCH] update --- app/lib/flexible_employment/pupiao.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/lib/flexible_employment/pupiao.go b/app/lib/flexible_employment/pupiao.go index a6cea82..c0b7193 100644 --- a/app/lib/flexible_employment/pupiao.go +++ b/app/lib/flexible_employment/pupiao.go @@ -3,6 +3,7 @@ package flexible_employment import ( "bytes" "crypto/md5" + "crypto/tls" "encoding/hex" "encoding/json" "fmt" @@ -22,7 +23,7 @@ type PuPiao struct { AppSecret string } -const urlForPrd = "http://admin.linglong.net.cn" +const urlForPrd = "https://admin.linglong.net.cn" const urlForDev = "http://api.testlg.cn" func NewPuPiao(appId, appSecret string) *PuPiao { @@ -106,7 +107,12 @@ func (gm *PuPiao) mergeMaps(map1, map2 map[string]interface{}) map[string]interf } func (gm *PuPiao) httpPostBody(url string, msg []byte) ([]byte, error) { - resp, err := http.Post(url, "application/json;charset=utf-8", bytes.NewBuffer(msg)) + client := &http.Client{ + Transport: &http.Transport{ + TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, + }, + } + resp, err := client.Post(url, "application/json;charset=utf-8", bytes.NewBuffer(msg)) if err != nil { return []byte(""), err }