在IE11上的ms-word插件中获取“ HTTPS安全性受到威胁”

问题描述

标题所述,我在使用x-frame-options: sameorigin在iframe中显示页面时遇到问题

在寻找可能的解决方案时,我遇到了x-frame-options: allow-from url,这没有什么区别。我所有的资源也都通过https提供。 同时使用x-frame-options: sameoriginx-frame-options: allow-from url时,sameorigin标头被禁用。

此外,在here上找到了有关x-frame-options的文档:

# ALLOW-FROM uri 
This is an obsolete directive that no longer works in modern browsers. Don't use it. In 
supporting legacy browsers,a page can be displayed in a frame only on the specified origin 
uri. Note that in the legacy Firefox implementation this still suffered from the same problem 
as SAMEORIGIN did — it doesn't check the frame ancestors to see if they are in the same origin.
The Content-Security-Policy HTTP header has a frame-ancestors directive which you can use 
instead.

我目前已将上述frame-ancestors实现为其他浏览器的支持,例如。 Chrome,Safari或Firefox,但IE11不支持。我不想删除这是一个安全层,以避免点击劫持。

有什么建议吗?

解决方法

如问题中所述,我发现在附加另一个x-frame-options标头时,sameorigin被禁用了。

所以我稍稍修改了标题,发现以下内容对于IE11来说是完美的,并且不影响其他浏览器:

res.set("X-Frame-Options","SAMEORIGIN,ALLOW-FROM url");

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...