如何禁用同源策略 Internet Explorer [英] How to disable same origin policy Internet Explorer

查看:25
本文介绍了如何禁用同源策略 Internet Explorer的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Chrome 允许我们禁用同源策略,因此我们可以测试跨源请求.我想知道是否有可能在 IE 中做同样的事情

Chrome allows us to disable the same origin policy, so we can test cross origin requests. I would like to know if there any possibility to do the same thing in IE

推荐答案

是的,您可以在 Internet 选项中进行设置:转到安全选项卡.对于当前区域,单击自定义级别..."按钮.在下一个窗口中,向下滚动大约三分之一到杂项 > 跨域访问数据源"并将其设置为启用".如果当前区域是 Internet,则应将该站点添加到受信任区域,并为受信任区域设置此选项.

Yes you can set this in Internet Options: Go to the Security tab. For the current zone click the "Custom level..." button. In the next window, scroll about a third of the way down to "Miscellaneous > Access data sources across domains" and set it to "Enable". If the current zone is Internet, then you should add the site to the trusted and set this option for the trusted zone instead.

请注意,这将有效地禁用 CORS,并且不会在请求中设置 Origin 标头.

Note that this will effectively disable CORS and will not set the Origin header in the request.

如果您访问的资源需要身份验证,您需要在请求中手动处理或在当前浏览器会话中预先验证自己.

If the resource your accessing requires authentication, you'll need to deal with this manually in the request or pre-authenticate yourself in your current browser session.

这篇关于如何禁用同源策略 Internet Explorer的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆