在Internet Explorer中使用CORS(跨源资源共享)时 - 是否支持提供Authroization(即基本身份验证)?
答案 0 :(得分:12)
简答:不。更长的答案:
Internet Explorer 7及更低版本不支持CORS
Internet Explorer 8和9通过XDomainRequest对象限制了CORS支持。 XDomainRequest对象不支持自定义标头,因此它不支持Authorization
标头。 (来源:http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx)
即将推出的Internet Explorer 10将完全支持CORS,其中包括对Authorization
等自定义标头的支持。 (来源:http://blogs.msdn.com/b/ie/archive/2012/02/09/cors-for-xhr-in-ie10.aspx)
答案 1 :(得分:0)
任何需要支持IE7,8,9 withCredentials的公共站点,请勿使用CORS。在Internet区域“跨域访问数据源”中禁用功能。只有受信任的区域域才能进行跨域调用。