mirror of https://github.com/gofiber/fiber.git
Change deprecated struct elements (#1335)
Duration and Store are deprecated, so we should show Expiration and Storage in examplepull/1337/head
parent
da1877f16c
commit
547bdb1c23
|
@ -53,14 +53,14 @@ app.Use(limiter.New(limiter.Config{
|
|||
return c.IP() == "127.0.0.1"
|
||||
},
|
||||
Max: 20,
|
||||
Duration: 30 * time.Second,
|
||||
Expiration: 30 * time.Second,
|
||||
KeyGenerator: func(c *fiber.Ctx) string{
|
||||
return "key"
|
||||
}
|
||||
LimitReached: func(c *fiber.Ctx) error {
|
||||
return c.SendFile("./toofast.html")
|
||||
},
|
||||
Store: myCustomStore{}
|
||||
Storage: myCustomStore{}
|
||||
}))
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue