Google recaptcha在浏览器扩展中

发布于 2025-02-02 02:59:47 字数 973 浏览 1 评论 0原文

我正在尝试将Google Recaptcha添加到我的V3浏览器扩展程序(react)中,但似乎不可能在我的index.html < head>标签中使用类似的外部脚本

<script defer src="https://www.google.com/recaptcha/enterprise.js?render=**RECAPTCHA_KEY**"></script>

。 a href =“ https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/#remotely-hostely-host-code-code-code-c ro =“ nofollow noreferrer” doc/extensions/mv3/intro/mv3-overview/#远程托管代码

A key security improvement in Manifest V3 is that extensions can't load remote code like JavaScript or Wasm files. 
This lets us more reliably and efficiently review the safe behavior of extensions when they're submitted to the Chrome Web Store. 
Specifically, all logic must be included in the extension's package.

Instead of remote code, we recommend the use of remote configuration files. 
See the migration guide for more about how to work with this change.

有关如何使其工作的任何提示?

先感谢您!

I'm trying to add google reCaptcha to my V3 browser extension (react) but seems like it's impossible to use external scripts like this in my index.html <head> tag

<script defer src="https://www.google.com/recaptcha/enterprise.js?render=**RECAPTCHA_KEY**"></script>

There is an info here https://developer.chrome.com/docs/extensions/mv3/intro/mv3-overview/#remotely-hosted-code

A key security improvement in Manifest V3 is that extensions can't load remote code like JavaScript or Wasm files. 
This lets us more reliably and efficiently review the safe behavior of extensions when they're submitted to the Chrome Web Store. 
Specifically, all logic must be included in the extension's package.

Instead of remote code, we recommend the use of remote configuration files. 
See the migration guide for more about how to work with this change.

Any tips on how to to make it work?

Thank you in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文