feat: add rate limiting to auth endpoints
Made-with: Cursor
This commit is contained in:
@@ -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) => {
|
||||
|
||||
Reference in New Issue
Block a user