1
0
mirror of https://github.com/bingohuang/docker-labs.git synced 2025-07-14 18:27:25 +08:00

Merge pull request #40 from franela/recaptcha_disable

Allow to disable recaptcha explicitly by env variable
This commit is contained in:
Marcos Nils 2016-11-16 20:45:35 +02:00 committed by GitHub
commit c12c506953

View File

@ -32,6 +32,9 @@ type recaptchaResponse struct {
}
func IsHuman(req *http.Request) bool {
if os.Getenv("GOOGLE_RECAPTCHA_DISABLED") != "" {
return true
}
req.ParseForm()
challenge := req.Form.Get("g-recaptcha-response")