Automatically clean failed login attempts
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
use std::time::Duration;
|
||||
|
||||
/// File in storage containing users list
|
||||
pub const USERS_LIST_FILE: &str = "users.json";
|
||||
|
||||
@@ -32,3 +34,4 @@ pub const LOGIN_ROUTE: &str = "/login";
|
||||
/// Bruteforce protection
|
||||
pub const KEEP_FAILED_LOGIN_ATTEMPTS_FOR: u64 = 3600;
|
||||
pub const MAX_FAILED_LOGIN_ATTEMPTS: u64 = 15;
|
||||
pub const FAIL_LOGIN_ATTEMPT_CLEANUP_INTERVAL: Duration = Duration::from_secs(60);
|
Reference in New Issue
Block a user