perf: 验证码支持 Cloudflare Turnstile ,谨慎启用,国内被墙了

This commit is contained in:
xiaojunnuo
2026-01-29 17:21:39 +08:00
parent b204182c13
commit ca43c77525
16 changed files with 214 additions and 28 deletions
@@ -5,6 +5,7 @@ import { ISmsService } from '../sms/api.js';
import { SmsServiceFactory } from '../sms/factory.js';
import { CaptchaService } from "./captcha-service.js";
import { EmailService } from './email-service.js';
import { CaptchaRequest } from '../../../plugins/plugin-captcha/api.js';
// {data: '<svg.../svg>', text: 'abcd'}
/**
@@ -25,8 +26,8 @@ export class CodeService {
async checkCaptcha(body:any) {
return await this.captchaService.doValidate({form:body})
async checkCaptcha(body:any,req:CaptchaRequest) {
return await this.captchaService.doValidate({form:body,req});
}
/**
*/