mirror of https://github.com/allinssl/allinssl
fix
parent
14bcf412cd
commit
7f9a708065
|
@ -88,12 +88,12 @@ func SessionAuthMiddleware() gin.HandlerFunc {
|
|||
return
|
||||
} else {
|
||||
if session.Get("__login_key") != public.GetSettingIgnoreError("login_key") {
|
||||
session.Set("secure", true)
|
||||
// session.Set("secure", true)
|
||||
session.Set("login", nil)
|
||||
session.Save()
|
||||
c.JSON(http.StatusUnauthorized, gin.H{"message": "登录信息发生变化,请重新登录"})
|
||||
// c.Redirect(http.StatusFound, "/login")
|
||||
c.Abort()
|
||||
// c.JSON(http.StatusUnauthorized, gin.H{"message": "登录信息发生变化,请重新登录"})
|
||||
c.Redirect(http.StatusFound, "/login")
|
||||
// c.Abort()
|
||||
} else {
|
||||
// 访问正常,更新最后请求时间
|
||||
session.Set("lastRequestTime", now)
|
||||
|
|
Loading…
Reference in New Issue