New public shifts system

This commit is contained in:
2025-08-22 14:45:40 -06:00
parent 960bd39e21
commit a026af5b48
24 changed files with 2236 additions and 65 deletions

View File

@@ -78,11 +78,23 @@ const adminLimiter = rateLimit({
message: 'Rate limit exceeded for admin operations. Please try again later.'
});
// Public signup rate limiter - prevent spam signups
const publicSignupLimiter = rateLimit({
windowMs: 15 * 60 * 1000, // 15 minutes
max: 5, // Max 5 signups per IP per 15 minutes
keyGenerator,
message: 'Too many signup attempts. Please try again later.',
standardHeaders: true,
legacyHeaders: false,
trustProxy: true
});
module.exports = {
apiLimiter,
strictLimiter,
authLimiter,
tempUserLimiter,
conditionalTempLimiter,
adminLimiter
adminLimiter,
publicSignupLimiter
};