fix: 短信接口按页面 JSONP 解析并原样提交票据
This commit is contained in:
@@ -49,7 +49,7 @@ func debugHTTP(req *http.Request, resp *http.Response, buf []byte, reqErr error)
|
||||
func debugSkipBody(req *http.Request, ctype string, buf []byte) bool {
|
||||
ct := strings.ToLower(ctype)
|
||||
path := strings.ToLower(req.URL.Path)
|
||||
if strings.Contains(ct, "image") || strings.Contains(ct, "javascript") || strings.Contains(ct, "text/css") {
|
||||
if strings.Contains(ct, "image") || strings.Contains(ct, "text/css") {
|
||||
return true
|
||||
}
|
||||
switch {
|
||||
@@ -58,6 +58,9 @@ func debugSkipBody(req *http.Request, ctype string, buf []byte) bool {
|
||||
strings.HasSuffix(path, ".html"):
|
||||
return true
|
||||
}
|
||||
if strings.Contains(ct, "javascript") && len(buf) > 8000 {
|
||||
return true
|
||||
}
|
||||
trim := strings.TrimSpace(string(buf))
|
||||
return strings.HasPrefix(trim, "<")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user