Authored by 王水玲

登录注册密码加密

... ... @@ -100,6 +100,10 @@ const common = {
const local = {
loginPage: (req, res) => {
// 先清除cookie
res.clearCookie('LE' + md5('_LOGIN_EXPIRE'), {
domain: 'yohobuy.com'
});
// 设置登录有效时间30分钟, 防机器刷,cache不稳定,改为cookie
res.cookie('LE' + md5('_LOGIN_EXPIRE'), (new Date()).getTime() / 1000 + 1800);
... ...