mirror of
https://github.com/danpros/htmly.git
synced 2026-04-17 11:16:00 +05:30
Added Cloudflare Turnstile as alternative to Google reCAPTCHA
Added the option to select Cloudflare's Turnstile instead of Google's reCAPTCHA for the login page due to it's less intrusive usage and better accessibility options.
This commit is contained in:
parent
3276b928b3
commit
46be29978d
7 changed files with 74 additions and 27 deletions
|
|
@ -121,7 +121,13 @@ get('/index', function () {
|
|||
post('/login', function () {
|
||||
|
||||
$proper = (is_csrf_proper(from($_REQUEST, 'csrf_token')));
|
||||
if (config('login.protect.system') === 'google') {
|
||||
$captcha = isCaptcha(from($_REQUEST, 'g-recaptcha-response'));
|
||||
} elseif (config('login.protect.system') === 'cloudflare') {
|
||||
$captcha = isTurnstile(from($_REQUEST, 'cf-turnstile-response'));
|
||||
} else {
|
||||
$captcha = true;
|
||||
}
|
||||
|
||||
$user = from($_REQUEST, 'user');
|
||||
$pass = from($_REQUEST, 'password');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue