Modifying X-Frame Options on an IFRAME through Node.JS?

我怕爱的太早我们不能终老 提交于 2020-01-02 06:31:11

问题


Is it possible to modify the Response Headers for an IFRAME in a Node.JS application?

Do you have to create a proxy first? ( Something similar to this? http://www.bennadel.com/blog/2179-Extending-EventEmitter-In-Order-To-Create-A-Response-Proxy-In-Node-js.htm )

I basically want to be able to show the mobile version of Gmail within an IFRAME.


回答1:


In general the answer is yes, you would have to proxy it. However in this particular case, that may not even work - Google seems to have deployed additional counter-measures to block logging-in via proxies. (If you're proxying the request, then you can see the users password, read their email, etc.)

If you only need to read your own email, then you have an alternate option: https://USERNAME:PASSWORD@gmail.google.com/gmail/feed/atom will give you an RSS feed of recent emails. This also has the x-frame-options: SAMEORIGIN header, but you can proxy it through node.



来源:https://stackoverflow.com/questions/6009901/modifying-x-frame-options-on-an-iframe-through-node-js

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!