0

I'm trying to check for cookies in node.js using cookie-parser and express. I have a simple route:

router.get('/', function(req,res){
   console.log("Cookies: ", req.cookies);
});

If I run http://localhost:3000/ in postman I get back {}. But if it put the same url into the address bar of my browser I get back the cookies I'm looking for. Any idea what I'm doing wrong?

mhyder1
  • 107
  • 2
  • 7
  • what's running on port 9000? Does trailing slash on your route matter? why isn't `router.get('/', login);` mapped to `router.get('/login', login);`? How do you think `redirect` works in the context of an ajax call? – dm03514 Aug 13 '15 at 17:17
  • possible duplicate of [How to manage a redirect request after a jQuery Ajax call](http://stackoverflow.com/questions/199099/how-to-manage-a-redirect-request-after-a-jquery-ajax-call) – dm03514 Aug 13 '15 at 17:19

0 Answers0