Package for web applications which wish to support IE 8-9 and need Cross Domain Request Support, specifically from HTTP pages to HTTPS.
The limitations of XDR functionality in IE 8 and 9 are described in this blog post: http://blogs.msdn.com/b/ieinternals/archive/2010/05/13/xdomainrequest-restrictions-limitations-and-workarounds.aspx. This library intends to provide the workaround for point 7. Please be aware of the other limitations and requirements on the server side around headers and response types as mentioned in the blog post, if you intend to support IE 8 and 9.
npm install --save x-domain-object-proxy
You will need to be able to set up an HTTPS folder on your web server and serve a html page which loads the
XDomainObjectProxy.proxy.js file and starts the proxy. A sample html file might look something like this:
We have a template
src/proxy/proxy.ejs which you can incorpate into your webpack build, or use your own template
You will then use the request helper as such:
// Either ES6 Importvar client = ;// Or as a global object from using <script> tagsvar client = XDomainObjectProxyclient;/*** some other code ...*/var options =location: ''path: '/apod'qs:'api_key': 'DEMO_KEY'client;