Reputation: 46359
I'm using XDomainRequest
in IE8 & 9 to send requests to a server. With XMLHttpRequests
in other browsers, both an Origin
and Referer
header are sent, and could look like this:
Origin: http://www.example.com
Referer: http://www.example.com/mypage/index.htm
But XDomainRequest
only sends the Origin (so I don't see the full calling URL). Is there a way to force it to also send the Referer? I'm trying to avoid sending it as a query string or POST parameter.
I know that XDomainRequest
doesn't allow custom headers, but I'm hoping that because Referer is a standard header there might be some way to enable it.
Upvotes: 5
Views: 1232
Reputation: 5630
One of my co-devs had this problem, that the CORS service they were calling required headers for "security", but IE couldn't send headers. We found no solution to IE8/9 headers problem apart from:
Option 2 explained is - Setup a web proxy, that will accept the call without headers. It then makes the CORS call and adds the header onto the request. It receives the payload and forwards it onto your request.
For what it's worth, we went with option 1.
Upvotes: 1