后台session数据过期改为1天

This commit is contained in:
luchenqun 2018-01-09 15:57:14 +08:00
parent fbf69483bc
commit 093a718677
2 changed files with 2 additions and 2 deletions

2
app.js
View File

@ -34,7 +34,7 @@ app.use(session({
saveUninitialized: true, // saveUninitialized: true, //
secret: 'ILoveYiJia', // 建议使用 128 个字符的随机字符串 secret: 'ILoveYiJia', // 建议使用 128 个字符的随机字符串
cookie: { cookie: {
maxAge: 30 * 24 * 60 * 60 * 1000, // 一个月 maxAge: 1 * 24 * 60 * 60 * 1000, // 一
}, },
store: new mongoStore({ store: new mongoStore({
url: 'mongodb://localhost/mybookmarks' url: 'mongodb://localhost/mybookmarks'

View File

@ -18,7 +18,7 @@
<i class="lock icon"></i> <i class="lock icon"></i>
</div> </div>
</div> </div>
<div class="field"> <div class="field" ng-show="false">
<div class="ui checkbox js-auto-login"> <div class="ui checkbox js-auto-login">
<input type="checkbox" name="auto-login" checked="true"> <input type="checkbox" name="auto-login" checked="true">
<label>30天内自动登陆</label> <label>30天内自动登陆</label>