mirror of
https://github.com/certd/certd.git
synced 2026-05-15 04:27:31 +08:00
perf: 验证码支持 Cloudflare Turnstile ,谨慎启用,国内被墙了
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query } from "@midwayjs/core";
|
||||
import { ALL, Body, Controller, Inject, Post, Provide, Query, RequestIP } from "@midwayjs/core";
|
||||
import {
|
||||
addonRegistry,
|
||||
AddonService,
|
||||
@@ -218,8 +218,8 @@ export class SysSettingsController extends CrudController<SysSettingsService> {
|
||||
|
||||
|
||||
@Post("/captchaTest", { summary: "sys:settings:edit" })
|
||||
async captchaTest(@Body(ALL) body: any) {
|
||||
await this.codeService.checkCaptcha(body)
|
||||
async captchaTest(@Body(ALL) body: any,@RequestIP() remoteIp: string) {
|
||||
await this.codeService.checkCaptcha(body,{remoteIp});
|
||||
return this.ok({});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user