From 326c86f94ec64280f2b947bb22561e576b9990b0 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 19 Apr 2022 09:03:57 +0200 Subject: [PATCH] Update rate limit function signature --- application/helpers/rate_limit_helper.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/application/helpers/rate_limit_helper.php b/application/helpers/rate_limit_helper.php index ba9ef9ad..0820a4ec 100644 --- a/application/helpers/rate_limit_helper.php +++ b/application/helpers/rate_limit_helper.php @@ -23,10 +23,10 @@ if ( ! function_exists('rate_limit')) * @link https://github.com/alexandrugaidei-atomate/ratelimit-codeigniter-filebased * * @param string $ip Client IP address. - * @param int $max_requests Number of allowed requests, defaults to 200. + * @param int $max_requests Number of allowed requests, defaults to 100. * @param int $duration In seconds, defaults to 2 minutes. */ - function rate_limit($ip, $max_requests = 100, $duration = 120) + function rate_limit(string $ip, int $max_requests = 100, int $duration = 120) { $CI =& get_instance();