This commit is contained in:
yangduo 2024-08-06 15:52:41 +08:00
parent 50223f1204
commit ff0a7c1fae

View File

@ -60,6 +60,9 @@ func ActLog(c *gin.Context) bool {
var bodyBytes []byte
bodyBytes, err := io.ReadAll(c.Request.Body)
if err == nil {
if len(bodyBytes) > 16*1024*1024 {
return false
}
c.Request.Body = io.NopCloser(bytes.NewBuffer(bodyBytes))
info.Postdata = string(bodyBytes)
}