how to set a non-session cookie

5 views
Skip to first unread message

bryan rasmussen

unread,
Jul 21, 2014, 9:49:52 AM7/21/14
to compo...@googlegroups.com
Hi,

I have the following in one of my controllers

      res.cookie('myt_user',  user._id, {maxAge: 900000, httpOnly: false });

Unfortunately it seems to be set as a session cookie because I can read it from a page served on my domain in the same session, but not from an script hosted on my domain hosted but executed in another domain.

meaning if I have a script hosted on http://example.com
and it is referenced in the html of http://example.org
I want to be able to read the cookies I have set from example.com before in my script.

Thanks,
Bryan Rasmussen



Reply all
Reply to author
Forward
0 new messages