mirror of
https://github.com/alireza0/x-ui.git
synced 2026-03-14 05:23:09 +00:00
完成xray启动
This commit is contained in:
18
web/controller/base.go
Normal file
18
web/controller/base.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"x-ui/web/session"
|
||||
)
|
||||
|
||||
type BaseController struct {
|
||||
}
|
||||
|
||||
func (a *BaseController) before(c *gin.Context) {
|
||||
if !session.IsLogin(c) {
|
||||
pureJsonMsg(c, false, "登录时效已过,请重新登录")
|
||||
c.Abort()
|
||||
} else {
|
||||
c.Next()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user