reCAPTCHA protects your website from fraud and abuse. reCAPTCHA uses an advanced risk analysis engine and adaptive challenges to keep malicious software from engaging in abusive activities on your website. Meanwhile, legitimate users will be able to login, make purchases, view pages, or create accounts and fake users will be blocked.
Read more at: https://www.google.com/recaptcha/about/
Using with Iris
The reCAPTCHA is a builtin middleware, you don't have to install it.
Stop more bots. Start protecting user privacy. Do you use a captcha to keep out bots? hCaptcha protects user privacy, rewards websites, and helps companies get their data labeled. It is a drop-in replacement for reCAPTCHA: you can switch within minutes.
Read more at: https://www.hcaptcha.com/
Using with Iris
The hCaptcha is a builtin middleware, you don't have to install it.
# https://docs.hcaptcha.com/#localdev
# Add to the end of your hosts file,
# e.g. on windows: C:/windows/system32/drivers/etc/hosts
127.0.0.1 yourdomain.com
Let's start by creating our HTML view template form:
Optionally, to get the hCaptcha original response you need to call hcaptcha.Get(ctx). Example:
hcaptchaResp, ok := hcaptcha.Get(ctx)
if !ok {
ctx.StatusCode(iris.StatusUnauthorized)
ctx.WriteString("Are you a bot?")
return
}
ctx.Writef("Register action here...action was asked by a Human.\nResponse value is: %#+v", hcaptchaResp)