mirror of https://github.com/allinssl/allinssl
安全入口特殊路由跳过重定向
parent
28dfd41249
commit
a89e77f559
|
@ -36,6 +36,9 @@ func SessionAuthMiddleware() gin.HandlerFunc {
|
|||
// 一定要保存 session BEFORE redirect
|
||||
session.Save()
|
||||
}
|
||||
if paths[0] == "login" || paths[0] == "home" {
|
||||
return
|
||||
}
|
||||
// 返回登录页
|
||||
c.Redirect(http.StatusFound, "/login")
|
||||
// c.Abort()
|
||||
|
|
Loading…
Reference in New Issue