mirror of
https://github.com/QuantumNous/new-api.git
synced 2026-03-30 00:46:42 +00:00
fix(gin): update request body size check to allow zero limit
This commit is contained in:
@@ -40,7 +40,7 @@ func GetRequestBody(c *gin.Context) ([]byte, error) {
|
||||
}
|
||||
}
|
||||
maxMB := constant.MaxRequestBodyMB
|
||||
if maxMB < 0 {
|
||||
if maxMB <= 0 {
|
||||
// no limit
|
||||
body, err := io.ReadAll(c.Request.Body)
|
||||
_ = c.Request.Body.Close()
|
||||
|
||||
Reference in New Issue
Block a user