reCAPTCHA v3 on forms

Google’s reCAPTCHA protects website forms against spam and abuse. It attempts to distinguish between human and bot submissions.

注解

reCAPTCHA v3 works in the background and does not interrupt visitors. However, if the check fails, visitors cannot submit the form.

配置

On Google

打开 the reCAPTCHA 网站注册页面。登录或创建 Google 账户(如有必要)。

在网站注册页面:

  • 为网站添加 标签

  • Leave the reCAPTCHA type on Score based (v3).

  • 输入一个或多个 :guilabel:`域名`(例如 example.comsubdomain.example.com)。

  • Google Cloud Platform 下,如果已使用登录的 Google 帐户创建了项目,则会自动选择一个项目。如果没有,则会自动创建一个。单击 Google Cloud Platform 可自行选择项目或重命名自动创建的项目。

  • 同意服务条款。

  • 点击:guilabel:提交

reCAPTCHA 网站注册示例

然后会显示一个包含生成密钥的新页面。为方便起见,请将其打开,因为接下来需要将密钥复制到 Odoo 中。

On Odoo

  • 从数据库仪表板,单击 设置。在 整合 下,根据需要启用 reCAPTCHA

    警告

    请勿禁用 reCAPTCHA 功能或卸载 Google reCAPTCHA integration 模块,因为许多其他模块也会被移除。

  • 打开 Google reCAPTCHA 页面,复制 网站密钥 并粘贴到 Odoo 中的 网站密钥 字段。

  • 打开 Google reCAPTCHA 页面,复制 密匙 并粘贴到 Odoo 中的 密匙 字段。

  • Change the default Minimum score (0.5) if necessary, using a value between 1.0 and 0.0. The higher the threshold is, the more difficult it is to pass the reCAPTCHA, and vice versa.

  • 点击:guilabel:保存

All pages using the Form, Newsletter Block, and Newsletter Popup snippets on the website are now protected by reCAPTCHA.

注解

小技巧

  • 谷歌的 reCAPTCHA 管理页面 <https://www.google.com/recaptcha/admin/>`_ 上提供了分析和其他设置。例如,如果谷歌在您的网站上检测到可疑流量,您可以收到电子邮件提醒,或查看可疑请求的百分比,这可以帮助您确定正确的最低分数。

  • 您可以通知访客,reCAPTCHA 对表单进行了保护。为此,请打开网站编辑器并导航至表单。然后,单击表单上的某处,在右侧边栏的 自定义 选项卡上,切换 显示 reCAPTCHA 政策,该政策位于 表单 部分下。

表单上显示的 reCAPTCHA 政策信息