mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-05 09:53:21 +08:00
Merge pull request #40 from franela/recaptcha_disable
Allow to disable recaptcha explicitly by env variable
This commit is contained in:
@@ -32,6 +32,9 @@ type recaptchaResponse struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func IsHuman(req *http.Request) bool {
|
func IsHuman(req *http.Request) bool {
|
||||||
|
if os.Getenv("GOOGLE_RECAPTCHA_DISABLED") != "" {
|
||||||
|
return true
|
||||||
|
}
|
||||||
req.ParseForm()
|
req.ParseForm()
|
||||||
challenge := req.Form.Get("g-recaptcha-response")
|
challenge := req.Form.Get("g-recaptcha-response")
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user