mirror of
https://github.com/usememos/memos.git
synced 2025-04-03 12:21:15 +02:00
fix: session max age (#392)
This commit is contained in:
parent
2a275b2875
commit
55dee0df7e
@ -25,7 +25,7 @@ func setUserSession(ctx echo.Context, user *api.User) error {
|
|||||||
sess, _ := session.Get("session", ctx)
|
sess, _ := session.Get("session", ctx)
|
||||||
sess.Options = &sessions.Options{
|
sess.Options = &sessions.Options{
|
||||||
Path: "/",
|
Path: "/",
|
||||||
MaxAge: 1000 * 3600 * 24 * 30,
|
MaxAge: 3600 * 24 * 30,
|
||||||
HttpOnly: true,
|
HttpOnly: true,
|
||||||
}
|
}
|
||||||
sess.Values[userIDContextKey] = user.ID
|
sess.Values[userIDContextKey] = user.ID
|
||||||
|
Loading…
x
Reference in New Issue
Block a user