Friday 21 April 2017

Express session is not creating a new session id on each request on Safari

I am using this configuration for session:

app.use(session({
  secret: config.cookieSecret,
  resave: true,
  saveUninitialized: true,
  store: sessionStore, //MongoStore
  key: 'sid',
  cookie: {
    name: 'sid',
    path: '/',
    maxAge: 1000 * 60 * 60 * 5 // 5h
  }
}));

It works fine in Chrome and Firefox (session id remains the same) but Safari somehow manages to create a new session id for each request. Is there any other way to handle this.



via Ylli Gashi

No comments:

Post a Comment