Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 iFrame,可以理解的是,我无法编辑元素。
有没有办法解决这个问题,比如使用某种代理?我需要它适用于任何网站,并保持会话和 cookie 数据等内容(用于登录等)。
有可能吗?
Nup,您不能使用 CORS,因为它仅受 XHR 支持。
同源政策将阻止您,这是理所当然的。
如果您可以通过自己的域、协议和端口代理该站点,那么它会起作用,但这通常非常困难。