I am having trouble getting my system to log out with PassportJS. It seems the logout route is being called, but its not removing the session. I want it to return 401, if th
This worked for me:
app.get('/user', restrictRoute, function (req, res) { res.header('Cache-Control', 'no-cache, private, no-store, must-revalidate, max-stale=0, post-check=0, pre-check=0'); });
It makes sure that your page won't get stored in cache