加载apex iframe时出现内容安全策略错误

加载apex iframe时出现内容安全策略错误,iframe,salesforce,content-security-policy,salesforce-lightning,Iframe,Salesforce,Content Security Policy,Salesforce Lightning,问题:我们的Visualforce页面集成出现CSP(内容安全策略)错误 问题是,当我们在沙盒测试中访问它时,我们发现我们的内容被包装在一个iframe中,并且iframe还包含一个iframe 外部iframe似乎没有URL,因此我们无法将其从CSP白名单中排除 apex将iframe动态地放在另一个没有任何src的iframe中,这就是为什么我们不能将可以将我们的站点打开到iframe中的域列入白名单的原因 这是示例父iframe 请让我知道是否有办法解决这种情况下的内容安全错误 <

问题:我们的Visualforce页面集成出现CSP(内容安全策略)错误

问题是,当我们在沙盒测试中访问它时,我们发现我们的内容被包装在一个iframe中,并且iframe还包含一个iframe

外部iframe似乎没有URL,因此我们无法将其从CSP白名单中排除

apex将iframe动态地放在另一个没有任何src的iframe中,这就是为什么我们不能将可以将我们的站点打开到iframe中的域列入白名单的原因

  • 这是示例父iframe
请让我知道是否有办法解决这种情况下的内容安全错误

<iframe allow="geolocation *; microphone *; camera *" frameborder="no" height="1000px" id="0661b0000004nmw" marginheight="0" marginwidth="0" name="0661b0000004nmw" scrolling="yes" title="HelloWorld" width="100%">
  <iframe src="https://example.com"> </iframe>
</iframe>
[Report Only] Refused to display 'https://example.com' in a frame because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'self' *.salesforce.com".