Commit 04ff3df5 by CaIon

fix(gin): update request body size check to allow zero limit

parent 3b05ac92
...@@ -40,7 +40,7 @@ func GetRequestBody(c *gin.Context) ([]byte, error) { ...@@ -40,7 +40,7 @@ func GetRequestBody(c *gin.Context) ([]byte, error) {
} }
} }
maxMB := constant.MaxRequestBodyMB maxMB := constant.MaxRequestBodyMB
if maxMB < 0 { if maxMB <= 0 {
// no limit // no limit
body, err := io.ReadAll(c.Request.Body) body, err := io.ReadAll(c.Request.Body)
_ = c.Request.Body.Close() _ = c.Request.Body.Close()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment