feat: use a FixedWindowRateLimiter keyed by IP to rate limit emails

we don't talk about the sent_emails table :)
This commit is contained in:
sam 2024-12-11 21:17:46 +01:00
parent 1ce4f9d278
commit 51e335f090
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
8 changed files with 75 additions and 87 deletions

View file

@ -110,6 +110,7 @@ public static class WebApplicationExtensions
.AddSingleton<IClock>(SystemClock.Instance)
.AddSnowflakeGenerator()
.AddSingleton<MailService>()
.AddSingleton<EmailRateLimiter>()
.AddScoped<UserRendererService>()
.AddScoped<MemberRendererService>()
.AddScoped<AuthService>()