Enforcing a global rate limit.
This commit is contained in:
@@ -31,5 +31,6 @@ func (app *application) routes() http.Handler {
|
||||
|
||||
// Return the httprouter instance.
|
||||
// Wrap the router with the panic recovery middleware
|
||||
return app.recoverPanic(router)
|
||||
// Wrap the router with the rateLimit() middleware
|
||||
return app.recoverPanic(app.rateLimit(router))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user