假设我在https://mail.example.com有一个Zimbra webmail。 我在https://app.example.com也有一个networking应用程序。 在其中一个应用程序的网页上,我试图embeddednetworking邮件:
<iframe src="https://mail.example.com"></iframe>
但是,当我去应用程序页面时,我得到以下错误(Firefox): Load denied by X-Frame-Options: https://mail.example.com/ does not permit cross-origin framing 。
如何在Zimbra服务器/ nginx上启用交叉框架(最好只适用于app.example.com)? 或者有可能以其他方式embeddednetworking邮件?
你需要编辑:
/opt/zimbra/jetty/etc/zimbra.web.xml.in
修改设置标题filter。 寻找:
<filter-name>Set Header Filter</filter-name> <filter-class>com.zimbra.webClient.filters.SetHeaderFilter</filter-class>
部分并添加以下参数:
<init-param> <param-name>allowInFrame</param-name> <param-value>true</param-value> </init-param>
之后,重新启动Zimbra:
zmcontrol restart
缺点是您需要检查在Zimbra软件上进行的每个更新中是否存在这些修改。