Enforcing a global rate limit.

This commit is contained in:
Maxime Delporte
2025-11-16 10:36:36 +01:00
parent e93375d441
commit 8b0c51123f
5 changed files with 27 additions and 1 deletions

View File

@@ -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))
}