Update ApiV1Dot1Controller, allow iar rate limits to be configurable

This commit is contained in:
Daniel Supernault 2023-10-29 03:06:10 -06:00
parent b58ed0ad01
commit 28a808031b
No known key found for this signature in database
GPG key ID: 23740873EE6F76A1

View file

@ -470,7 +470,7 @@ class ApiV1Dot1Controller extends Controller
abort_if(BouncerService::checkIp($request->ip()), 404);
}
$rl = RateLimiter::attempt('pf:apiv1.1:iar:'.$request->ip(), 3, function(){}, 1800);
$rl = RateLimiter::attempt('pf:apiv1.1:iar:'.$request->ip(), config('pixelfed.app_registration_rate_limit_attempts', 3), function(){}, config('pixelfed.app_registration_rate_limit_decay', 1800));
abort_if(!$rl, 400, 'Too many requests');
$this->validate($request, [