【问题标题】:Unable to load my application into IFRAME无法将我的应用程序加载到 IFRAME
【发布时间】:2016-04-13 19:37:22
【问题描述】:

我无法从 127.0.0.1/localhost/example.com 将我的测试 https(带有自签名证书)站点加载到 iframe 中

在我的 Java Spring 应用程序中,我添加了以下行:

.headers().frameOptions().disable().addHeaderWriter(new StaticHeadersWriter("X-FRAME-OPTIONS", "ALLOW-FROM example.com"))

但仍无法将我的应用程序https://127.0.0.1:8443 加载到 IFRAME 中

<html>
    <head>
    </head>
    <body>
        <iframe src="https://127.0.0.1:8443"></iframe>
    </body>
</html>

如何允许将我的应用程序加载到 iframe 中?

【问题讨论】:

标签: html spring iframe spring-security https


【解决方案1】:

【讨论】:

  • .headers().frameOptions().disable();最后我让它工作了。非常感谢!!
猜你喜欢
  • 2012-04-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2015-05-20
  • 1970-01-01
  • 2015-01-15
  • 2017-09-01
相关资源
最近更新 更多