From 813d0c233e9252adc4621022a7c04b65b7ad0640 Mon Sep 17 00:00:00 2001 From: leo Date: Wed, 10 May 2023 17:48:02 +0200 Subject: [PATCH] echo settings: enable rate-limiting --- app/echoSettings.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/echoSettings.go b/app/echoSettings.go index a8cf88d..bd79081 100644 --- a/app/echoSettings.go +++ b/app/echoSettings.go @@ -37,6 +37,9 @@ func (a *App) SetEchoSettings() { // }, // })) + // TODO: have this in the config. + e.Use(middleware.RateLimiter(middleware.NewRateLimiterMemoryStore(20))) + e.Use(middleware.Recover()) e.Use(session.Middleware(