mirror of
https://github.com/alireza0/x-ui.git
synced 2026-08-27 03:43:28 +00:00
完成xray启动
This commit is contained in:
parent
56ed8f355c
commit
3cd25ce5ea
42 changed files with 3627 additions and 229 deletions
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()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue