CORS headers for a node.js server
// allow cors access from any external domain
app.all('/', function(req, res, next)
{
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "X-Requested-With");
next();
});