loop: baseline
This commit is contained in:
+2
-2
@@ -18,13 +18,13 @@ const loginSchema = zod.strictObject({
|
||||
const registerLimiter = rateLimit({
|
||||
windowMs: 60 * 60 * 1000, // 1 hour
|
||||
max: process.env.NODE_ENV === 'test' ? 1000 : 5,
|
||||
message: { error: { code: 'RATE_LIMITED', message: 'Too many registration attempts. Try again later.' } },
|
||||
message: { ok: false, error: { code: 'RATE_LIMITED', message: 'Too many registration attempts. Try again later.' } },
|
||||
});
|
||||
|
||||
const loginLimiter = rateLimit({
|
||||
windowMs: 15 * 60 * 1000, // 15 minutes
|
||||
max: process.env.NODE_ENV === 'test' ? 1000 : 10,
|
||||
message: { error: { code: 'RATE_LIMITED', message: 'Too many login attempts. Try again later.' } },
|
||||
message: { ok: false, error: { code: 'RATE_LIMITED', message: 'Too many login attempts. Try again later.' } },
|
||||
});
|
||||
|
||||
function wrap(fn) {
|
||||
|
||||
Reference in New Issue
Block a user