%PDF- %PDF-
| Direktori : /home/opti/workflow/src/middleware/ |
| Current File : /home/opti/workflow/src/middleware/login.js |
module.exports = function (req, res, next) {
// if user is authenticated in the session, carry on
if (req.isAuthenticated()) {
return next();
}
// if they aren't redirect them to the home page
// req.session.backURL = req.header('Referer') || '/';
res.redirect('/login');
}