title: cookies cannot access from client
body: <p>i'm trying to understand session and cookie using JS
  i'm using express-session package to handle the session and cookie. The problem is from my client side, when i'm using postman the cookie appear</p>
  
  <pre><code>sessionID 92bda427-c9fd-4281-9979-a5b58b925e59
   req.session Session {
    cookie: 
     { path: '/',
      _expires: 2018-11-17T04:53:52.616Z,
      originalMaxAge: 432000000,
      httpOnly: false,
      secure: false,
      domain: 'localhost' },
       __lastAccess: 1541998432616 }
      req.cookies { SID: 's:92bda427-c9fd-4281-9979- 
      a5b58b925e59.gLHHBeXoebwvFEA3Y0d9kOwLxC6ICgkbcSPU9FMmHkQ'}
  </code></pre>
  
  <p>but when i'm using client to acces the same path, the cookie just return empty object, I already checked some stackoverflow question and some said to change the secure: false and httpOnly: false, but it didn't work for me</p>
  
  <pre><code>sessionID d5ec7773-fc1c-4aad-9dbb-6f822107a681
  req.session Session {
    cookie: 
     { path: '/',
       _expires: 2018-11-17T04:53:58.260Z,
       originalMaxAge: 432000000,
       httpOnly: false,
       domain: 'localhost',
       secure: false } }
  req.cookies {}
  </code></pre>
  
  <p>my express setting</p>
  
  <pre><code>var express = require('express');
  var cookieParser = require('cookie-parser');
  var session = require('express-session');
  var FileStore = require('session-file-store')(session);
  
  var app = express();
  app.use(cookieParser());
  app.use(session({
    genid: (req) =&gt; {
      return uuid() // use UUIDs for session IDs
    },
    cookie: {
      domain: 'localhost',
      path: '/',
      secure: false,
      maxAge: 7 * 24 * 60 * 60 * 1000, // 7 days
      httpOnly: false,
    },
    store: new FileStore(),
    secret: 'some secret key',
    name: 'SID',
    resave: true,
    saveUninitialized: true
  }))
  </code></pre>