我正在使用包在laravel应用程序上设置CSP头。但无法应用inline style,并在出现以下错误时拒绝。
Refused to apply inline style because it violates the following Content Security Policy
directive: "style-src 'self' 'nonce-TjpZGox5zGathTvJDeVMfxzHaOtWMc7v' 'unsafe-inline'".
进一步的细节。
我用的是拉里7号。
/spatie/larav
我试着用我自己的webpack设置和配置重新创建了一个我的React应用,这个应用是用create-react-app完成的。在我遇到内容安全策略问题之前,一切都很正常,如下所示:
Refused to execute inline script because it violates the following Content Security Policy directive: "default-src 'none'". Either the 'unsafe-inline' keyword, a hash ('sha256-ThhI8
是否有方法处理从外部库添加的内联脚本/样式?在我自己的风格中,我只使用nonce,但不能将它添加到外部库中。
我使用tooltip.io,当liblary试图运行时出现问题:
function() {
var n = e("./styles/css/styles.scss")
, t = document.createElement("style");
t.innerHTML = n,
document.head.appendChi
我的CSP策略正被最新版本的Chrome所忽视。我今天决定重新创建这个策略来尝试调试为什么,但是正如您从下面的错误中看到的,Chrome建议我添加一个已经在CSP中的散列(请参阅sha256-idz8mDU5fJ8lJuEwY6hbkXVde/nqBBjQE/u5rxw1HUk=):)。
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' https://pro.fontawesome.co