Skip to content

Commit 3205495

Browse files
cgalibernaldas
authored andcommitted
Update RateLimiterWithConfig example
1 parent 096ce41 commit 3205495

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

middleware/rate_limiter.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ RateLimiterWithConfig returns a rate limiting middleware
8989
id := ctx.RealIP()
9090
return id, nil
9191
},
92-
ErrorHandler: func(context *echo.Context, err error) error {
92+
ErrorHandler: func(ctx *echo.Context, err error) error {
9393
return context.JSON(http.StatusTooManyRequests, nil)
9494
},
95-
DenyHandler: func(context *echo.Context, identifier string) error {
95+
DenyHandler: func(ctx *echo.Context, identifier string, err error) error {
9696
return context.JSON(http.StatusForbidden, nil)
9797
},
9898
}

0 commit comments

Comments
 (0)