main
Yasen Pramatarov 2025-02-17 15:40:34 +02:00
parent 144dd6e742
commit ddb86eae51
1 changed files with 1 additions and 1 deletions

View File

@ -11,7 +11,7 @@ require_once __DIR__ . '/../classes/ratelimiter.php';
* @return bool True if request is allowed, false if rate limited * @return bool True if request is allowed, false if rate limited
*/ */
function checkRateLimit($database, $endpoint, $userId = null) { function checkRateLimit($database, $endpoint, $userId = null) {
$rateLimiter = new RateLimiter($database); $rateLimiter = new RateLimiter($database['db']);
$ipAddress = $_SERVER['REMOTE_ADDR']; $ipAddress = $_SERVER['REMOTE_ADDR'];
// Check if request is allowed // Check if request is allowed