mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-09 18:33:36 +02:00
cleanup and simplify middleware implementations, refactor some other code
This commit is contained in:
@@ -60,7 +60,7 @@ func checkHost(f http.HandlerFunc) http.HandlerFunc {
|
||||
}
|
||||
|
||||
func rateLimited(f http.HandlerFunc) http.HandlerFunc {
|
||||
m, err := middleware.RateLimiter.WithOptionsClone(middleware.OptionsRaw{
|
||||
m, err := middleware.RateLimiter.New(middleware.OptionsRaw{
|
||||
"average": 10,
|
||||
"burst": 10,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user