Iframe 嵌入linkedin帖子-拒绝框架和DomeException

Iframe 嵌入linkedin帖子-拒绝框架和DomeException,iframe,linkedin,content-security-policy,Iframe,Linkedin,Content Security Policy,我正在尝试嵌入linkedin帖子,只需单击他们提供的嵌入选项并复制html即可 演示: 这显然很好,但控制台有很多错误: [Report Only] Refused to frame 'https://www.linkedin.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'". urn:li:share:6

我正在尝试嵌入linkedin帖子,只需单击他们提供的嵌入选项并复制html即可

演示:

这显然很好,但控制台有很多错误:

[Report Only] Refused to frame 'https://www.linkedin.com/' because an ancestor violates the following Content Security Policy directive: "frame-ancestors 'none'".

urn:li:share:6788184218288590848:1 Uncaught (in promise) DOMException: getInstalledRelatedApps() is only supported in top-level browsing contexts.
有人知道如何解决此问题吗?

对的响应将设置内容安全策略(不带框架祖先),而内容安全策略报告仅在响应标题中设置框架祖先“无”。仅内容安全策略报告冲突在控制台中显示为错误,如果指定了报告uri或报告收件人,则会发送报告,但在浏览器中被阻止

除非代理请求删除标头,否则无法真正修复此问题。LinkedIn可能会这样做,以收集关于有多少帖子被嵌入的统计数据。这也可能是因为他们正在测试一个更严格的CSP,该CSP可能在将来的某个时候强制实施,以防止以这种方式嵌入