added express payload validation

This commit is contained in:
2025-10-28 18:58:58 +01:00
parent a838ba44e8
commit 5f8a6bef31
12 changed files with 1490 additions and 793 deletions

View File

@@ -0,0 +1,16 @@
import rateLimit from 'express-rate-limit';
export const authLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 5, // Limit each IP to 5 login requests per windowMs
message: { error: 'Zu viele Login-Versuche, bitte versuchen Sie es später erneut' },
standardHeaders: true,
legacyHeaders: false,
});
export const apiLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 100, // Limit each IP to 100 requests per windowMs
standardHeaders: true,
legacyHeaders: false,
});