mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-02-12 11:30:07 +08:00
fix: 解决浏览器关闭后重新打开不需要登录验证的问题 (#1180)
This commit is contained in:
parent
7c0327c1b8
commit
10684f9aac
@ -109,7 +109,7 @@ func (u *AuthService) generateSession(c *gin.Context, name, authMethod string) (
|
|||||||
sessionUser, err := global.SESSION.Get(sID)
|
sessionUser, err := global.SESSION.Get(sID)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
sID = uuid.New().String()
|
sID = uuid.New().String()
|
||||||
c.SetCookie(constant.SessionName, sID, 604800, "", "", false, false)
|
c.SetCookie(constant.SessionName, sID, 0, "", "", false, false)
|
||||||
err := global.SESSION.Set(sID, sessionUser, lifeTime)
|
err := global.SESSION.Set(sID, sessionUser, lifeTime)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
Loading…
x
Reference in New Issue
Block a user