VUE启动服务后控制台报错:Refused to load the image 'http://localhost:8080/favicon.ico' because it violates the following Content Security Policy directive: "default-src 'none'". Note that 'img-src' was not explicitly set, so 'default-src' is used as a fallback.
拒绝加载图像“http://localhost:8080/favicon.ico”
因为它违反了以下内容安全策略指令:
“默认SRC‘none’”。请注意,没有显式设置“img-src”,
所以“default src”用作回退。
报错原因:修改了config/index.js里面的assetsPublicPath: '/',的路径,所以报错。
重新改回 assetsPublicPath: '/',即可
assetsPublicPath: '/',
更多推荐
VUE报错because it violates the following Content Security Policy directive
发布评论