Browse Source

update

master
dengbiao 5 days ago
parent
commit
3359746dd8
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      app/mw/mw_limiter.go

+ 1
- 2
app/mw/mw_limiter.go View File

@@ -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))


Loading…
Cancel
Save