From 3359746dd8d0738e8116d7f80e86ad9be9113eab Mon Sep 17 00:00:00 2001 From: dengbiao Date: Tue, 17 Dec 2024 16:44:04 +0800 Subject: [PATCH] update --- app/mw/mw_limiter.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/mw/mw_limiter.go b/app/mw/mw_limiter.go index 0aa78e1..babd4a8 100644 --- a/app/mw/mw_limiter.go +++ b/app/mw/mw_limiter.go @@ -27,10 +27,9 @@ func Limiter(c *gin.Context) { host := c.Request.Host uri := c.Request.URL.String() - buf := make([]byte, 1024*1024) + buf := make([]byte, 1024*1024*5) //TODO::5M num, _ := c.Request.Body.Read(buf) body := buf[:num] - //body, _ := ioutil.ReadAll(c.Request.Body) // Write body back c.Request.Body = ioutil.NopCloser(bytes.NewBuffer(body))