尝试在 Meteor 中使用 Sir Trevor JS 上传图片但得到:
Refused to load the image 'blob:http%3A//localhost%3A3000/a28ef7dc-ee51-4290-9941-6b8fc317e685'
because it violates the following Content Security Policy directive:
"img-src data: 'self' http://*.googleapis.com https://*.googleapis.com
http://*.gstatic.com https://*.gstatic.com http://*.bootstrapcdn.com
https://*.bootstrapcdn.com http://*.facebook.com https://*.facebook.com
http://*.fbcdn-profile-a.akamaihd.net https://*.fbcdn-profile-a.akamaihd.net
blob://*.localhost".
我正在使用 browser-policy 包,但不知道如何接受这个 URL。我尝试了许多不同的政策,但无法让它发挥作用。示例:
BrowserPolicy.content.allowDataUrl("blob://*.localhost:3000");
BrowserPolicy.content.allowOriginForAll("blob:*.localhost:3000/");
BrowserPolicy.content.allowOriginForAll("blob:*.localhost:3000");
BrowserPolicy.content.allowImgUrlForAll();
BrowserPolicy.content.allowSameOriginForAll();
有什么想法吗?
最佳答案
关于javascript - meteor 浏览器策略 : allow uploading images,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33296341/