File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ Limit size of POST requests for Gin framework
15
15
package main
16
16
17
17
import (
18
+ " net/http"
18
19
" github.com/gin-contrib/size"
19
20
" github.com/gin-gonic/gin"
20
21
)
@@ -29,7 +30,7 @@ func handler(ctx *gin.Context) {
29
30
30
31
func main () {
31
32
rtr := gin.Default ()
32
- rtr.Use (ratelimit .RateLimiter (10 ))
33
+ rtr.Use (limits .RateLimiter (10 ))
33
34
rtr.POST (" /" , handler)
34
35
rtr.Run (" :8080" )
35
36
}
Original file line number Diff line number Diff line change 1
1
package main
2
2
3
3
import (
4
+ "net/http"
4
5
"github.com/gin-contrib/size"
5
6
"github.com/gin-gonic/gin"
6
7
)
@@ -15,7 +16,7 @@ func handler(ctx *gin.Context) {
15
16
16
17
func main () {
17
18
rtr := gin .Default ()
18
- rtr .Use (ratelimit .RateLimiter (10 ))
19
+ rtr .Use (limits .RateLimiter (10 ))
19
20
rtr .POST ("/" , handler )
20
21
rtr .Run (":8080" )
21
22
}
You can’t perform that action at this time.
0 commit comments