aboutsummaryrefslogtreecommitdiffstats
path: root/templates/base
diff options
context:
space:
mode:
authorByLCY <bylcy@bylcy.dev>2023-02-05 15:29:03 +0800
committerGitHub <noreply@github.com>2023-02-05 15:29:03 +0800
commit7baeb9c52a69eb6f7e0973986f2a6bebdd6352d0 (patch)
tree9aa89a504561468d26726507edb21c32a13621ae /templates/base
parente35f8e15a67e8268542d2442dac32993b6944043 (diff)
downloadgitea-7baeb9c52a69eb6f7e0973986f2a6bebdd6352d0.tar.gz
gitea-7baeb9c52a69eb6f7e0973986f2a6bebdd6352d0.zip
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>
Diffstat (limited to 'templates/base')
-rw-r--r--templates/base/footer.tmpl7
1 files changed, 5 insertions, 2 deletions
diff --git a/templates/base/footer.tmpl b/templates/base/footer.tmpl
index 4d3e08a597..e3cac806a4 100644
--- a/templates/base/footer.tmpl
+++ b/templates/base/footer.tmpl
@@ -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>