title: Difficulty sending cookies with fetch requests in JavaScript
body: <p>I have two separate services, a <code>React</code> single page application and an <code>express</code> API and I'm trying to communicate from the SPA to the API using the new <code>fetch</code> feature. Since the two services lie on different domains, I'm using a CORS middleware inside of the <code>express</code> application in order to make requests from the SPA to the API. I'm trying to make any <code>fetch</code> requests also include cookies so that way I can verify the cookies in my <code>express</code> application, for example</p>
  
  <p>On the client side:</p>
  
  <pre><code>fetch('http://localhost:8000/hello', { 
      credentials: 'include', 
      mode: 'cors' 
  }).then(/* ... */)
  </code></pre>
  
  <p>On the server side:</p>
  
  <pre><code>var app = express();
  
  app.use(cors({ credentials: true });
  app.use(cookieParser());
  
  app.get('/hello', function (req, res) {
    // Try and find the cookies sent with the request
    console.log(req.cookies);
  
    res.status(200).json({ message: 'cookies received!' });
  });
  </code></pre>
  
  <p>However, no matter what I try I still cannot access any cookies on the <code>request</code> object even though I can access them through using <code>document.cookies</code>.</p>
  
  <p>An example cookie:</p>
  
  <pre><code>name: token
  value: TOKEN_VALUE
  domain: localhost
  path: /
  http: false
  secure: false
  </code></pre>
  
  <p>Does anyone have suggestions on how to approach this? Any help would be greatly appreciated!</p>