转载地址: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; "   即可。

 

 

Logo

助力广东及东莞地区开发者,代码托管、在线学习与竞赛、技术交流与分享、资源共享、职业发展,成为松山湖开发者首选的工作与学习平台

更多推荐