feat(core): Allow customizing rate limits on a per-route basis, and add rate limiting to more endpoints (#9522)

Co-authored-by: Omar Ajoue <krynble@gmail.com>
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2024-06-03 11:20:51 +02:00
committed by GitHub
parent cda1e3f6e5
commit 7be616e583
7 changed files with 32 additions and 18 deletions

View File

@@ -41,7 +41,7 @@ export class PasswordResetController {
/**
* Send a password reset email.
*/
@Post('/forgot-password', { skipAuth: true, rateLimit: true })
@Post('/forgot-password', { skipAuth: true, rateLimit: { limit: 3 } })
async forgotPassword(req: PasswordResetRequest.Email) {
if (!this.mailer.isEmailSetUp) {
this.logger.debug(