Revived API POST /api/v1/captcha.

Captcha validation has been adjusted.
This commit is contained in:
2023-11-26 15:09:42 +06:00
parent 18899c81f2
commit 520a3ba068
21 changed files with 365 additions and 12 deletions

View File

@@ -50,5 +50,10 @@ class RouteServiceProvider extends ServiceProvider
Limit::perHour(config('rate_limiting.login_max_email_request', 10))->by($request->getClientIp() . '-' . $request->input('email')),
];
});
RateLimiter::for('captcha-checking', function (Request $request) {
return [
Limit::perMinute(config('captcha.validate_max_count_errors', 5))->by($request->input('captcha_key', null)),
];
});
}
}