我在Symfony工具栏的转储部分遇到了问题。我的项目运行Symfony 3.4,并通过ResponseListener启用了CSP,因此工具栏可以添加自己的CSP规则。 CSP已修改且现时已存在。但是转储部分的样式已损坏,Chrome DevTools控制台报告:
Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' 'unsafe-inline' 'nonce-0fe24c92ba51051b857978ad5dd4ccd0'". Note that 'unsafe-inline' is ignored if either a hash or nonce value is present in the source list.
标题为:Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-eval' 'unsafe-inline' 'nonce-e35b1a5d7442e859961ee8b0af1cc05e'; img-src 'self' data:; style-src 'self' 'unsafe-inline' 'nonce-0fe24c92ba51051b857978ad5dd4ccd0'
页面源代码中的相应样式标签:<style nonce="0fe24c92ba51051b857978ad5dd4ccd0">
你能帮我吗?