//setup cookies and sessions app.use(express.cookieParser()); app.use(express.session({ key: app.config.session.key, secret: app.config.session.secret, store: new redisStore({ host: app.config.db.hosts.master.host, port: app.config.db.hosts.master.port, pass: app.config.db.password }), cookie: { path : '/', domain : '.mydomain.com', httpOnly : true, maxAge : 1000*60*60*24*30*12 //one year(ish) } }));
Hi David,
Did you end up figuring this out? I have the same problem :(
My two applications share the same session configuration (same secret, etc.). In fact, the configuration is applied by a shared code module.
Thank you,
-C
--
You received this message because you are subscribed to a topic in the Google Groups "Express" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/express-js/JG9-DU1USH8/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to express-js+...@googlegroups.com.
To post to this group, send email to expre...@googlegroups.com.
Visit this group at http://groups.google.com/group/express-js?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
domain: ".app.localhost" and it will work. The 'domain' parameter needs 1 or more dots in the domain name for setting cookies. Then you can have sessions working across localhost subdomains such as: api.app.localhost:3000.domain: ".app.localhost" and it will work. The 'domain' parameter needs 1 or more dots in the domain name for setting cookies. Then you can have sessions working across localhost subdomains such as: api.app.localhost:3000.