当我通过 XDomainRequest 对象在 IE 中执行 CORS 时,未发送 Referer HTTP 标头。是否有任何官方文档涵盖此内容?我完全理解,依赖Referer HTTP header 基本上是错误的想法,但是没有确凿的证据我被困在这里,并且无法证明我们的架构师是错误的。
转储示例:
IE 请求
GET http://example.com/some/url HTTP/1.1
Accept: */*
Origin: http://another.domain.com
Accept-Language: sk-SK
UA-CPU: AMD64
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3)
Host: example.com
Connection: Keep-Alive
Pragma: no-cache
铬请求
GET http://example.com/some/url HTTP/1.1
Host: example.com
Connection: keep-alive
Origin: http://another.domain.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.69 Safari/537.36
Accept: */*
Referer: http://another.domain.com/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: sk-SK,sk;q=0.8,cs;q=0.6,en-US;q=0.4,en;q=0.2