From c1a8dba1a30468285e13e598edc49c0353654da3 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 8 Mar 2022 17:25:25 +0100 Subject: [PATCH] Reduce the default rate limit duration to 2 minutes --- application/helpers/rate_limit_helper.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/application/helpers/rate_limit_helper.php b/application/helpers/rate_limit_helper.php index bd741952..ba9ef9ad 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 100. - * @param int $duration In seconds, defaults to 5 minutes. + * @param int $max_requests Number of allowed requests, defaults to 200. + * @param int $duration In seconds, defaults to 2 minutes. */ - function rate_limit($ip, $max_requests = 100, $duration = 300) + function rate_limit($ip, $max_requests = 100, $duration = 120) { $CI =& get_instance();