优化代码

This commit is contained in:
GoEdgeLab
2022-04-08 16:11:05 +08:00
parent 9d0467fe8a
commit bf604baf3d
6 changed files with 20 additions and 6 deletions

View File

@@ -2,6 +2,7 @@ package checkpoints
import (
"github.com/TeaOSLab/EdgeNode/internal/waf/requests"
"github.com/TeaOSLab/EdgeNode/internal/waf/utils"
"github.com/iwind/TeaGo/maps"
"net/url"
)
@@ -24,7 +25,7 @@ func (this *RequestFormArgCheckpoint) RequestValue(req requests.Request, param s
var bodyData = req.WAFGetCacheBody()
if len(bodyData) == 0 {
data, err := req.WAFReadBody(int64(32 * 1024 * 1024)) // read 32m bytes
data, err := req.WAFReadBody(utils.MaxBodySize) // read body
if err != nil {
return "", err, nil
}