我已经阅读了Content Security Policy docs,并且有我的图像源的条目。我的值与文档中的示例相匹配,但Chrome报告该值无效:
Unrecognized Content-Security-Policy directive 'pbs.twimg.com'.
Unrecognized Content-Security-Policy directive 'https://pbs.twimg.com'.报头是:
Content-Security-Policy-Report-Only:default-src 'self' 'unsafe-inline' 'unsafe-eval' mycompany.com *.typekit.net *.stripe.com *.mxpnl.com *.twitter.com;img-src 'self' data:; pbs.twimg.com;font-src fonts.googleapis.com fonts.gstatic.com *.typekit.net;report-uri /csp-violation发布于 2015-07-28 21:01:57
在data:之后和pbs.twimg.com之前有一个分号,因此pbs.twimg.com被视为指令名,而不是指令值的一部分。
https://stackoverflow.com/questions/31676720
复制相似问题