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