Skip rate limiting for whitelisted

main
Yasen Pramatarov 2024-12-10 15:56:18 +02:00
parent 08394be35e
commit a31939cb87
1 changed files with 5 additions and 0 deletions

View File

@ -92,6 +92,11 @@ class RateLimiter {
} }
public function attempt($username, $ipAddress) { public function attempt($username, $ipAddress) {
// Skip rate limiting for whitelisted IPs
if ($this->isIpWhitelisted($ipAddress)) {
return true;
}
// Clean old attempts // Clean old attempts
$this->clearOldAttempts(); $this->clearOldAttempts();