后台session数据过期改为1天
This commit is contained in:
parent
fbf69483bc
commit
093a718677
2
app.js
2
app.js
|
|
@ -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'
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue