loop: baseline

This commit is contained in:
bepis
2026-10-20 20:33:35 +11:00
parent f1ae7b3119
commit 9a308b697d
32 changed files with 959 additions and 2046 deletions
+2 -2
View File
@@ -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) {