{
// Token in cookies presumably wrong: erase it
res.clearCookie("token");
- res.clearCookie("id");
- res.clearCookie("name");
loggedIn = false;
}
callback();
// Prevent direct access to AJAX results
ajax: function(req, res, next) {
- if (!req.xhr)
+ if (!req.xhr)
return res.json({errmsg: "Unauthorized access"});
next();
},