backend: reduce login attempt window to 5 minutes and skip successful requests
This commit is contained in:
parent
894864d1e5
commit
b92aec9d30
@ -217,8 +217,9 @@ const getAuthenticatedUserOrAnonymous = async (req: Request): Promise<User> => {
|
||||
|
||||
// Limit login attempts to avoid brute force attacks
|
||||
const loginLimiter = rateLimit({
|
||||
windowMs: ms('15m'),
|
||||
windowMs: ms('5m'),
|
||||
limit: 5,
|
||||
skipSuccessfulRequests: true,
|
||||
message: 'Too many login attempts, please try again later'
|
||||
});
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user