Stripe Checkout错误加载自定义字体

问题描述 投票:1回答:1

我正在集成Strip Checkout而没有任何功能问题(到目前为止在我的本地机器上)。我遇到的唯一问题是,当加载Stripe Checkout脚本时,我的devtools控制台中出现690+错误,说明:

Refused to load the font 'https://fonts.gstatic.com/s/barlow/v1/7cHqv4kjgoGqM7E3t-4s51os.woff2' because it violates the following Content Security Policy directive: "font-src 'none'".

我试图在我的页面中添加一个CSP元数据:

<meta http-equiv="Content-Security-Policy" content="font-src 'self' https://*.gstatic.com">

但是仍存在许多错误。如何修复它们?

stripe-payments content-security-policy
1个回答
0
投票

只是好奇,当你访问https://stripe.github.io/elements-examples/

你看到类似的错误吗?

这可能是一个很长的镜头,但你现在使用什么样的镀铬扩展?似乎很多安装了grammarly的人都有同样的问题。如果是这样,你可以禁用扩展名并再试一次吗?

谢谢

© www.soinside.com 2019 - 2024. All rights reserved.