feat: add rate limiting to auth endpoints

Made-with: Cursor
This commit is contained in:
Anton
2026-03-04 14:11:29 +03:00
parent 78809a064e
commit 682885ce5a
2 changed files with 9 additions and 7 deletions

View File

@@ -29,6 +29,7 @@ const rateLimitPlugin: FastifyPluginAsync = async (app: FastifyInstance) => {
app.decorate('rateLimitOptions', options);
await app.register(rateLimit, {
global: false,
max: options.apiGuest.max,
timeWindow: options.apiGuest.timeWindow,
keyGenerator: (req) => {