title: Why cookie is not set in request?
body: <p>I read a lot of entries but anything response my question. </p>
  
  <p>I'm setting the cookie and auth works out. I can log in with www and non-www domain. But when I logged in and javascript makes requests the cookie is not present in the headers in non-www domain. If I'm in the www domain the same request has the cookie.</p>
  
  <p>Why can I log in with both domains (www and non-www) but when I make request with javascript from non-www domain the cookie is not present in the headers?</p>
  
  <p>I set a auth cookie like this:</p>
  
  <pre class="lang-js prettyprint-override"><code>res
    .status(200)
    .cookie('cookie_name', token, {
      domain: '.myDomain.com',
      httpOnly: true,
      maxAge: 1000 * 60 * 60 * 24 * 3,
      secure: !!(process.env.NODE_ENV === 'production')
    }) // 3 days
  </code></pre>