【前言】:
本篇博客旨在总结这类问题:
1. 在Site/Community中使用Iframe嵌套外部链接,无法显示;
2. 在Community中使用第三方CSS/JS,无法生效;
3. 第三方无法正常使用Site/Community暴露的链接资源;
【Community篇】:
1. Community无法加载QR Code Image Formula Field?
场景:需要在Community的Campaign上展示QR Code,Sales登入后就能获得独一无二的QR Code,用于捕获Lead;
QR API for free: https://api.qrserver.com/v1/create-qr-code/?margin=10&size=200x200&data=https://baidu.com
问题:Community无法显示图片,并报错如下:
Refused to load the image, because it violates the following Content Security Policy directive: "img-src 'self' data: blob:
方案:配置CSP Trusted Sites
拓展:在Builder的Security的CSP处添加QR Code API不会生效,这里特指Script.
【Site篇】: