title: cookie not set on cross domain - angularjs and nodejs/express
body: <p>cookie is not set on cross domain request. my server is running in localhost:8000 and client side running in localhost:9000. cors settings on the server nodejs/express is </p>
  
  <pre><code>app.use(function(req, res, next) {
  console.log(req.method);
  res.header("Access-Control-Allow-Origin", "*");
  res.header('Access-Control-Allow-Methods', 'GET,PUT,POST,DELETE,OPTIONS');
  res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept, Cache-Control, Authorisation");
  if (req.method === 'OPTIONS') {
      return res.send(200);
  } else {
      return next();
  }});
  </code></pre>
  
  <p>Angualarjs is used in client side and the cors configuration is</p>
  
  <pre><code>SelappsAdmin.config(['$httpProvider', function($httpProvider) {
    $httpProvider.defaults.useXDomain = true;
    delete $httpProvider.defaults.headers.common['X-Requested-With'];
  }])
  </code></pre>