禁用同源策略Internet Explorer [英] Disable same origin policy Internet Explorer

查看:234
本文介绍了禁用同源策略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天全站免登陆