mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-23 19:37:35 +08:00
eat: add reCAPTCHA v3 and Cloudflare Turnstile verification support
- Implement reCAPTCHA v3 with score-based validation - Add Cloudflare Turnstile as captcha alternative - Create reusable CaptchaService for unified validation - Support switching between recaptcha, recaptcha-v3, and turnstile - Maintain backward compatibility with existing configurations
This commit is contained in:
@@ -18,11 +18,17 @@ class CommController extends Controller
|
||||
'email_whitelist_suffix' => (int) admin_setting('email_whitelist_enable', 0)
|
||||
? Helper::getEmailSuffix()
|
||||
: 0,
|
||||
'is_recaptcha' => (int) admin_setting('recaptcha_enable', 0) ? 1 : 0,
|
||||
'is_captcha' => (int) admin_setting('captcha_enable', 0) ? 1 : 0,
|
||||
'captcha_type' => admin_setting('captcha_type', 'recaptcha'),
|
||||
'recaptcha_site_key' => admin_setting('recaptcha_site_key'),
|
||||
'recaptcha_v3_site_key' => admin_setting('recaptcha_v3_site_key'),
|
||||
'recaptcha_v3_score_threshold' => admin_setting('recaptcha_v3_score_threshold', 0.5),
|
||||
'turnstile_site_key' => admin_setting('turnstile_site_key'),
|
||||
'app_description' => admin_setting('app_description'),
|
||||
'app_url' => admin_setting('app_url'),
|
||||
'logo' => admin_setting('logo'),
|
||||
// 保持向后兼容
|
||||
'is_recaptcha' => (int) admin_setting('captcha_enable', 0) ? 1 : 0,
|
||||
];
|
||||
return $this->success($data);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user