Add Cap Captcha support (#2511)

* Add Cap Captcha support

- Add CaptchaCap type constant in types.go
- Add Cap struct with InstanceURL, KeyID, and KeySecret fields
- Add CapCaptcha method in provider.go to return Cap settings
- Add default settings for Cap captcha in setting.go
- Implement Cap captcha verification logic in middleware
- Expose Cap captcha settings in site API

This adds support for Cap captcha service as an alternative
captcha option alongside existing reCAPTCHA, Turnstile and
built-in captcha options.

* update cap json tags
This commit is contained in:
WittF
2025-06-19 11:31:17 +08:00
committed by GitHub
parent 9a216cd09e
commit 9f9796f2f3
5 changed files with 83 additions and 0 deletions

View File

@@ -143,6 +143,9 @@ var DefaultSettings = map[string]string{
"captcha_ReCaptchaSecret": "defaultSecret",
"captcha_turnstile_site_key": "",
"captcha_turnstile_site_secret": "",
"captcha_cap_instance_url": "",
"captcha_cap_key_id": "",
"captcha_cap_key_secret": "",
"thumb_width": "400",
"thumb_height": "300",
"thumb_entity_suffix": "._thumb",