i want to get cookie value in node server with socket.io
so every time socket send message to server i check the value of cookie
(i don't want session cookie) only in express i get the cookie by
router.get('/', function(req, res, next) {
var cookie_id = req.cookies.userIDf;
console.log(cookie_id);
res.render('index', { title: 'Express' });
});
its work here but with socket.io i cant get cookie any solution ?
io.sockets.on('connection', function (socket) {
var cookief =socket.handshake.headers['cookie'];
console.log(cookief); // its give me session id not the cookies
});