Refused to load the image '<URL>' because it violates the following content security polity diretive
转载地址:https://www.cnblogs.com/xiaoxiaoluoye/p/6945044.html深入学习地址:https://www.cnblogs.com/Hwangzhiyoung/p/9146740.html控制台报错:Refused to load the image '<URL>' because it violates the follo...
·
转载地址:https://www.cnblogs.com/xiaoxiaoluoye/p/6945044.html
深入学习地址:https://www.cnblogs.com/Hwangzhiyoung/p/9146740.html
控制台报错:
Refused to load the image '<URL>' because it violates the following content security polity diretive: 'default-src *'. Note that 'img-src' was not explicity set. so 'default-src' is used as a fallback.
(拒绝加载图像“ <URL>”,因为它违反了以下内容安全规定:“ default-src *”。 请注意,未明确设置“ img-src”。)
解决办法:
<meta http-equiv="Content-Security-Policy" content="default-src *;img-src 'self' data: base64; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"/>
设置 " img-src 'self' data: base64; " 即可。
更多推荐
已为社区贡献2条内容
所有评论(0)