Update scan.go

This commit is contained in:
公明 2025-03-21 11:02:54 +08:00 committed by GitHub
parent 7656705bc6
commit 87e5d163b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -127,7 +127,7 @@ func sendHTTPAndKimi(r *RequestResponseLog) (result string, respA string, respB
RawQuery: r.Request.URL.RawQuery, RawQuery: r.Request.URL.RawQuery,
} }
if isNotSuffix(r.Request.URL.Path, config.GetConfig().Suffixes) && !containsString(r.Response.Header.Get("Content-Type"), config.GetConfig().AllowedRespHeaders) { if isNotSuffix(r.Request.URL.Path, config.GetConfig().Suffixes) && !containsString(r.Response.Header.Get("Content-Type"), config.GetConfig().AllowedRespHeaders) {
log.Println("Req1:", req1) log.Println("ReqA:", req1)
req, err := http.NewRequest(r.Request.Method, fullURL.String(), strings.NewReader(string(r.Request.Body))) req, err := http.NewRequest(r.Request.Method, fullURL.String(), strings.NewReader(string(r.Request.Body)))
if err != nil { if err != nil {
fmt.Println("创建请求失败:", err) fmt.Println("创建请求失败:", err)
@ -158,7 +158,7 @@ func sendHTTPAndKimi(r *RequestResponseLog) (result string, respA string, respB
return "", "", "", err // 返回错误 return "", "", "", err // 返回错误
} }
req2 := string(jsonDataReq2) req2 := string(jsonDataReq2)
log.Println("Req2:", req2) log.Println("ReqB:", req2)
client := &http.Client{} client := &http.Client{}
resp, err := client.Do(req) resp, err := client.Do(req)
if err != nil { if err != nil {