diff --git a/server/app/app.go b/server/app/app.go index d215262eae4..1c53b80911b 100644 --- a/server/app/app.go +++ b/server/app/app.go @@ -38,13 +38,13 @@ func (app *Router) routes(path string) http.Handler { r := chi.NewRouter() if conf.Server.AuthRequestLimit > 0 { - log.Info(context.TODO(), "Login rate limit set", "requestLimit", conf.Server.AuthRequestLimit, + log.Info("Login rate limit set", "requestLimit", conf.Server.AuthRequestLimit, "windowLength", conf.Server.AuthWindowLength) - rateLimiter := httprate.LimitByIP(conf.Server.AuthRequestLimit, conf.Server.AuthWindowLength) + rateLimiter := httprate.LimitByIP(conf.Server.AuthRequestLimit, conf.Server.AuthWindowLength) r.With(rateLimiter).Post("/login", Login(app.ds)) } else { - log.Warn(context.TODO(), "Login rate limit is disabled! Consider enabling it to be protected against brute-force attacks") + log.Warn("Login rate limit is disabled! Consider enabling it to be protected against brute-force attacks") r.Post("/login", Login(app.ds)) }