mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-22 14:31:26 +00:00
Update ApiV1Dot1Controller, add configurable app confirm rate limit ttl
This commit is contained in:
parent
1686fc68e8
commit
4c6a0719ca
1 changed files with 2 additions and 2 deletions
|
@ -602,8 +602,8 @@ class ApiV1Dot1Controller extends Controller
|
|||
abort_if(BouncerService::checkIp($request->ip()), 404);
|
||||
}
|
||||
|
||||
$rl = RateLimiter::attempt('pf:apiv1.1:iarc:'.$request->ip(), 10, function(){}, 1800);
|
||||
abort_if(!$rl, 400, 'Too many requests');
|
||||
$rl = RateLimiter::attempt('pf:apiv1.1:iarc:'.$request->ip(), config('pixelfed.app_registration_confirm_rate_limit_attempts', 20), function(){}, config('pixelfed.app_registration_confirm_rate_limit_decay', 1800));
|
||||
abort_if(!$rl, 429, 'Too many requests');
|
||||
|
||||
$this->validate($request, [
|
||||
'user_token' => 'required',
|
||||
|
|
Loading…
Reference in a new issue