You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@answer.apache.org by li...@apache.org on 2024/08/06 02:18:37 UTC

(incubator-answer-plugins) 01/02: fix(recaptcha): Site Verify Endpoint

This is an automated email from the ASF dual-hosted git repository.

linkinstar pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-answer-plugins.git

commit a15252fd0db95a6ca51fc55ab5c4bc097f75168d
Author: lightum_cc <je...@createchstudio.com>
AuthorDate: Sat Jul 27 20:07:16 2024 +0800

    fix(recaptcha): Site Verify Endpoint
    
    Since users in China cannot access google.com, so I replace it with a more common domain: www.recaptcha.net
---
 captcha-google-v2/recaptcha.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/captcha-google-v2/recaptcha.go b/captcha-google-v2/recaptcha.go
index ae4e7b1..127afe0 100644
--- a/captcha-google-v2/recaptcha.go
+++ b/captcha-google-v2/recaptcha.go
@@ -88,7 +88,7 @@ func (c *Captcha) Verify(captcha, userInput string) (pass bool) {
 	}
 	cli := &http.Client{}
 	cli.Timeout = 10 * time.Second
-	resp, err := cli.PostForm("https://www.google.com/recaptcha/api/siteverify", map[string][]string{
+	resp, err := cli.PostForm("https://www.recaptcha.net/recaptcha/api/siteverify", map[string][]string{
 		"secret":   {c.Config.SecretKey},
 		"response": {userInput},
 	})