Add new captcha: cloudflare turnstile (#22369)
Added a new captcha(cloudflare turnstile) and its corresponding document. Cloudflare turnstile official instructions are here: https://developers.cloudflare.com/turnstile Signed-off-by: ByLCY <bylcy@bylcy.dev> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Jason Song <i@wolfogre.com>
This commit is contained in:
parent
e35f8e15a6
commit
7baeb9c52a
13 changed files with 199 additions and 32 deletions
|
@ -16,10 +16,13 @@
|
|||
<!-- Third-party libraries -->
|
||||
{{if .EnableCaptcha}}
|
||||
{{if eq .CaptchaType "recaptcha"}}
|
||||
<script src='{{URLJoin .RecaptchaURL "api.js"}}' async></script>
|
||||
<script src='{{URLJoin .RecaptchaURL "api.js"}}'></script>
|
||||
{{end}}
|
||||
{{if eq .CaptchaType "hcaptcha"}}
|
||||
<script src='https://hcaptcha.com/1/api.js' async></script>
|
||||
<script src='https://hcaptcha.com/1/api.js'></script>
|
||||
{{end}}
|
||||
{{if eq .CaptchaType "cfturnstile"}}
|
||||
<script src='https://challenges.cloudflare.com/turnstile/v0/api.js'></script>
|
||||
{{end}}
|
||||
{{end}}
|
||||
<script src="{{AssetUrlPrefix}}/js/index.js?v={{AssetVersion}}" onerror="alert('Failed to load asset files from ' + this.src + '. Please make sure the asset files can be accessed.')"></script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue