【发布时间】:2023-04-03 04:05:01
【问题描述】:
我的网站 javascript 出现问题,在主页上,引导程序中的下拉框将不起作用,但是在子目录上它似乎工作得非常好......我的 CSP 标题如下:
script-src 'self' //ajax.cloudflare.com
根据我对 CSP 文档的理解;空格将允许指令中的多个条目。 “脚本源”
我不明白为什么它在主页上不起作用。我在这里不知所措。
错误:
index.php:10 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'self' //ajax.cloudflare.com". Either the 'unsafe-inline' keyword, a hash ('sha256-safag'), or a nonce ('nonce-...') is required to enable inline execution.
【问题讨论】:
标签: javascript twitter-bootstrap http-headers