feat: Initialize the Express server with essential middleware, security, authentication, routing, and service configurations.

This commit is contained in:
Michael committed 2026-03-02 14:06:50 +01:00
1 parent 6d16dc9d41
commit a71c5a278f
1 file changed
+4 -4
+4 -4
View File
@@ -39,19 +39,19 @@ app.use(helmet({
crossOriginEmbedderPolicy: false,
}));
// Rate limiting global - 100 requêtes par 15 minutes par IP
// Rate limiting global - 1000 requêtes par 15 minutes par IP
const globalLimiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 100,
max: 1000,
message: { error: 'Trop de requêtes, réessayez plus tard' },
standardHeaders: true,
legacyHeaders: false,
});
// Rate limiting strict pour l'authentification - 5 tentatives par 15 minutes
// Rate limiting pour l'authentification - 30 tentatives par 15 minutes
const authLimiter = rateLimit({
windowMs: 15 * 60 * 1000,
max: 5,
max: 30,
message: { error: 'Trop de tentatives de connexion, réessayez dans 15 minutes' },
standardHeaders: true,
legacyHeaders: false,