Revived API POST /captcha/{captcha_uuid}.

Receiving captcha information for validation.
This commit is contained in:
2023-11-26 22:42:22 +06:00
parent 10425db5e0
commit 9221e089dd
17 changed files with 290 additions and 5 deletions

View File

@@ -52,8 +52,13 @@ class RouteServiceProvider extends ServiceProvider
});
RateLimiter::for('captcha-checking', function (Request $request) {
return [
Limit::perMinute(config('captcha.validate_max_count_errors', 5))->by($request->input('captcha_key', null)),
Limit::perMinute(config('captcha.validate_max_count_errors', 5))->by($request->getClientIp() . '-' . $request->input('captcha_key', 'key')),
];
});
RateLimiter::for('captcha-verification-information', function (Request $request) {
return [
Limit::perMinute(config('captcha.max_info_display_count', 5))->by($request->getClientIp() . '-' . $request->route('captcha_uuid', 'uuid')),
];
});
}
}