We have backbone.js application that is using rest API. With every request user/pass should be send to the API. This is how we send the request:
`Backbone.BasicAuth.set(tempUser, tempPass);
this.fetch({
error: function(){
// code
},
success:function(model, response){
// code
}} );`
This was not working for IE 8/9 so we made node.js server and by using the node-http-proxy module we made proxy server that will intercept all the requests.
This is the node proxy server:
`var httpProxy = require('http-proxy');
var options = {'target': {
'host': 'test.someserver.com',
'port': 8800
}};
httpProxy.createServer(function(req, res, proxy) {
req.headers.host = 'test.someserver.com';
proxy.proxyRequest(req, res, options);
}).listen('8080');`
Our problem now is to send the user/pass to the node proxy server, we know that XDomainRequest does not support custom headers and we don't like to send the user/pass as query string (it is not secure).
Is there a way that user/pass can be send to the node proxy server from IE 8/9?