added the rate limiter - Whoa There, Tiger!

This commit is contained in:
2026-03-10 22:59:35 -06:00
parent e10cf0b48c
commit a1837b2cea
8 changed files with 95 additions and 3 deletions
+4 -1
View File
@@ -49,8 +49,11 @@ func setupEcho() *echo.Echo {
}
e.Use(LogrusMiddleware)
// set up the rate limiter from the configuration
rateLimiter := AmSetupRateLimiter()
// This is the set of all middleware functions used by the UI, as opposed to other things.
uiset := []echo.MiddlewareFunc{ui.SessionStoreInjector, ui.ContextCreator, ui.IPBanTest, ui.CookieLoginTest}
uiset := []echo.MiddlewareFunc{ui.SessionStoreInjector, ui.ContextCreator, rateLimiter, ui.IPBanTest, ui.CookieLoginTest}
e.RouteNotFound("/*", ui.AmWrap(AmNotFoundHandler), uiset...)
fs, err := config.AmOpenExternalContentPath()