Magento 2 cloudflare 无法安装 Matomo

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

我们正在使用 magento 2,并在网站上启用了 Cloudflare,但是当我们尝试安装 Matomo 时,在浏览器控制台上遇到此问题 -

index.php:1 Refused to load the script 'https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c124171
    7689176015' because it violates the following Content Security Policy directive: 
    "default-src 'self' 'unsafe-inline' 'unsafe-eval'". Note that 'script-src-elem' was not 
    explicitly set, so 'default-src' is used as a fallback.

还有 安装出现此 SQLSTATE 错误是不正确的 - enter image description here 有谁知道如何解决这个问题吗?

php e-commerce magento2 cloudflare matomo
1个回答
0
投票

您需要将 csp_whitelist.xml 中的 cloudflare 域名列入白名单。

有关更多详细信息,您可以查看 Magento 2 donc https://developer.adobe.com/commerce/php/development/security/content-security-policies/

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