kuaza
(kuaza)
2024 年9 月 20 日 18:19
1
我查看了 console.log 并看到了这些错误。可能是什么原因?Google Analytics 看不到 AdSense 用户批准功能。这就是我查看控制台区域时注意到的原因。您认为可能是什么原因?
错误
Refused to load the script ‘Login | HSTS Redirection Community ’ because it violates the following Content Security Policy directive: “script-src ‘nonce-7mgUxkI7bU1WPKnOwauZMiIwN’ ‘strict-dynamic’”.
Load failed or canceled (net::ERR_ABORTED) for rule set requested from “Login | HSTS Redirection Community ” found in Speculation-Rules header.
simon
2024 年9 月 21 日 20:19
2
有一个与内容安全策略错误相关的近期主题,其中包含一个脚本 https://forum.example.com/cdn-cgi/speculation:https://meta.discourse.org/t/issue-with-activate-account-page-after-update-to-3-4-0-blank-page/327541。我想知道最近 Cloudflare 或 Discourse 是否有什么变化。
我的理解是,如果启用了“Speed Brain”,则 /cdn-cgi/speculation 端点会添加到 Cloudflare 上注册的域。它旨在允许 Cloudflare 在用户将鼠标悬停在链接上时预取页面内容。我不确定它是否与 Discourse 兼容。
您的网站使用的是哪个版本的 Discourse?
您是在网站上遇到任何错误,还是仅仅在控制台中看到 CSP 错误?
您可以尝试禁用 Speed Brain 吗?它似乎默认启用。可以从 Cloudflare 仪表板的“Speed”选项卡中禁用它:Speed Brain · Cloudflare Speed docs
2 个赞
kuaza
(kuaza)
2024 年9 月 22 日 00:09
3
我不知道 Cloudflare 的这项新功能,我很久没有进入面板了,这是新东西。禁用它之后,错误就消失了。我猜这个功能在 Discourse 这样的系统中没有用,还是我误解了?
https://community.cloudflare.com/t/cdn-cgi-speculation-applies-even-if-disabled/714033
1 个赞
simon
2024 年9 月 22 日 01:01
4
我认为它无法与 Discourse 配合使用。我猜它试图预取 HTML。Discourse 是一个 JavaScript 应用程序,因此预取 HTML 将不起作用。
2 个赞
system
(system)
关闭
2024 年10 月 22 日 01:02
5
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.