【问题标题】:How To Add More Than 50 Domains in Google Recaptcha如何在 Google Recaptcha 中添加 50 多个域
【发布时间】:2020-07-28 11:37:35
【问题描述】:

我正在为我的网站使用 Google Recaptcha V2,并且我添加了 50 个域 来支持 Captcha在这些域上。但是我有 50 多个域要添加,而我无法在 google recaptcha admin 中进行操作。 那么对此有什么解决方案/建议吗?

【问题讨论】:

    标签: recaptcha multiple-domains


    【解决方案1】:

    经过大量研究后,我发现我们根本无法为每个关键站点/密钥对添加超过 50 个域。 但是,我们可以为每个 google 帐户添加 50 个这样的密钥对,然后创建一个包含域列表及其站点/秘密密钥对的 JSON,例如

    {
       "CaptchaGroups":{
          "Group 1":{
             "CaptchaSiteKey":"group 1 site key",
             "CaptchaSecretKey":"group 1 secret key",
             "Domains":[
                "domain1.com",
                "domain2.co",
                "domain3.edu"
             ]
          },
          "Group 2":{
             "CaptchaSiteKey":"group 2 site key",
             "CaptchaSecretKey":"group 2 secret key",
             "Domains":[
                "domain4.com",
                "domain5.co",
                "domain6.edu",
                "localhost"
             ]
          }
       }
    }
    

    然后在代码中我们可以读取相应的域并使用站点/密钥对来使用。

    【讨论】:

      【解决方案2】:

      您可以做的是转到您的 Google 控制台管理面板的设置并取消勾选“验证 reCAPTCHA 解决方案的来源”选项 - 这样您就可以在 50 多个域上使用 reCAPTCHA v2。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-02-19
        • 2015-10-18
        • 1970-01-01
        • 1970-01-01
        • 2015-09-29
        • 1970-01-01
        • 2016-03-27
        • 1970-01-01
        相关资源
        最近更新 更多