iframe - 内容安全策略、X-Frame-Options 和 localhost

标签 iframe content-security-policy x-frame-options

关于 X-Frame-Options 的 101 个问题和/或 Content-Security-Policy: frame-ancestors : 如果打算在本地机器上使用 iframe 生产站点(我可以在其上调整标题)开发应用程序,他们是否必须添加 localhostframe-ancestorsContent-Security-Policy ?威尔X-Frame-Options SAMEORIGIN根本不工作?

最佳答案

您可能希望从框架响应中去除这些 header ,这样它们就不会阻止渲染。

在本地,唯一适用的是 localhost 响应中的 frame-src 允许您嵌入生产站点(根本不设置 csp 也可以)。

关于iframe - 内容安全策略、X-Frame-Options 和 localhost,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44018880/

相关文章:

javascript - Demandforce 任命表格,与 Wordpress 集成

internet-explorer - Internet Explorer的内容安全策略(CSP)解决方法

javascript - 禁用内联样式 CSP 和 HTML 元素的动态定位

ruby-on-rails - 如何在 Rails 4 Controller 中为 "allow-from" "X-Frame-Options"多个域?

asp.net - 如何绕过X-Frame-Options : SAMEORIGIN HTTP Header?

javascript - Facebook 评论导致 iPhone 和 iOS 版 Safari 出现 javascript 错误

javascript - 完全隔离来自同一域的 iframe 中的 javascript

facebook - FB iframe Canvas 高度

content-security-policy - CSP 可以限制动态加载脚本的连接吗?

security - 内容安全策略 connect-src 指令是否允许您发出跨域请求?