Skip to content

Commit

Permalink
fix: wrong type of MaxCalculator in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
luk3skyw4lker committed Jul 11, 2024
1 parent d232508 commit 732408e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/middleware/limiter.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ app.Use(limiter.New(limiter.Config{
|:-----------------------|:--------------------------|:--------------------------------------------------------------------------------------------|:-----------------------------------------|
| Next | `func(fiber.Ctx) bool` | Next defines a function to skip this middleware when returned true. | `nil` |
| Max | `int` | Max number of recent connections during `Expiration` seconds before sending a 429 response. | 5 |
| MaxCalculator | `int` | A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429 response. | A function which returns the cfg.Max |
| MaxCalculator | `func(fiber.Ctx) int` | A function to calculate the max number of recent connections during `Expiration` seconds before sending a 429 response. | A function which returns the cfg.Max |
| KeyGenerator | `func(fiber.Ctx) string` | KeyGenerator allows you to generate custom keys, by default c.IP() is used. | A function using c.IP() as the default |
| Expiration | `time.Duration` | Expiration is the time on how long to keep records of requests in memory. | 1 * time.Minute |
| LimitReached | `fiber.Handler` | LimitReached is called when a request hits the limit. | A function sending 429 response |
Expand Down

0 comments on commit 732408e

Please sign in to comment.