diff --git a/.gitignore b/.gitignore index 72399b5f92..4be45e03e6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +dist/ yarn.lock npm-debug.log node_modules/ diff --git a/src/middleware/headers.js b/src/middleware/headers.js index cad6f5f168..1de3fc5f74 100644 --- a/src/middleware/headers.js +++ b/src/middleware/headers.js @@ -56,7 +56,7 @@ module.exports = function (middleware) { } // Validate session - if (req.uid && !req.session.meta && !res.get('Set-Cookie')) { + if (req.uid > 0 && !req.session.meta && !res.get('Set-Cookie')) { res.clearCookie(nconf.get('sessionKey'), meta.configs.cookie.get()); }