解决 iFrame 跨域策略吗?
我有一个 iFrame,可以理解的是,我无法编辑元素。
有解决办法吗,比如使用某种代理?我需要它适用于任何网站,并保留会话和 cookie 数据等内容(用于登录等)。
这有可能吗?
I have an iFrame and, understandably, I can't edit the elements.
Is there a work around for this, like using some sort of proxy? I would need it to work for any website and have things like sessions and cookie data persist (for logins etc).
Is it at all possible?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Nup,并且您不能使用 CORS,因为它仅受 XHR 支持。
同源政策会阻止你,这是理所当然的。
如果您可以通过自己的域、协议和端口代理该站点,那就可以了,但这通常非常困难。
Nup, and you can't use CORS because it is only supported by XHR.
Same Origin Policy is going to stop you, and rightfully so.
If you could proxy the site through your own domain, protocol and port, it'd work, but that is often quite difficult.