IE 11 无法在框架中显示此页面

IE 11 this page cannot be displayed in a frame

有一个 iframe 标签,其 src(第 N 个页面)在 WordPress 页面中不是同源的。

  1. 我检查了N页的httpheader包括
    X-Frame-Options: ALLOW-FROM *.mydomain.com;
    Content-Security-Policy: frame-ancestors *.mydomain.com
    X-XSS-protection: 0
    proxy_hide_header 完全覆盖,Set-Cookie header 也被 proxy_hide_header 隐藏。

  2. 但它仍然不能在 IE 11 中工作,但在 chrome 或 safari 中工作。

不知道为什么..

感谢@Alexey Ten

X-Frame-Options ALLOW-FROM 需要 URI 格式。

我测试过它可以在 IE11、10、9 和 8 中运行。

我的nginx.conf只有

proxy_hide_header 'X-Frame-Options'; # this should be needed
add_header 'X-Frame-Options' 'ALLOW-FROM http://sub.example.com';
add_header 'Content-Security-Policy' 'frame-ancestors http://sub.example.com';