mirror of
https://github.com/gotoeasy/glogcenter.git
synced 2025-09-15 12:58:34 +08:00
v0.14.1
This commit is contained in:
parent
e02f31480e
commit
ee48588ebc
@ -33,6 +33,7 @@ func LogSearchController(req *gweb.HttpRequest) *gweb.HttpResult {
|
||||
username = GetUsernameByToken(token)
|
||||
catchSession.Set(token, username) // 会话重新计时
|
||||
}
|
||||
SetOrigin(req)
|
||||
|
||||
// 准备好各种场景的检索条件(系统【~】、日志级别【!】、用户【@】)
|
||||
startTime := time.Now()
|
||||
|
||||
@ -23,11 +23,17 @@ func TestModeController(req *gweb.HttpRequest) *gweb.HttpResult {
|
||||
|
||||
// 查询版本信息
|
||||
func VersionController(req *gweb.HttpRequest) *gweb.HttpResult {
|
||||
glcOrigin = req.GinCtx.GetHeader("Origin")
|
||||
rs := cmn.OfMap("version", ver.VERSION, "latest", glcLatest) // version当前版本号,latest最新版本号
|
||||
return gweb.Result(rs)
|
||||
}
|
||||
|
||||
func SetOrigin(req *gweb.HttpRequest) {
|
||||
origin := req.GinCtx.GetHeader("Origin")
|
||||
if origin != "" {
|
||||
glcOrigin = origin
|
||||
}
|
||||
}
|
||||
|
||||
// 查询日志仓名称列表
|
||||
func StorageNamesController(req *gweb.HttpRequest) *gweb.HttpResult {
|
||||
if (!InWhiteList(req) && InBlackList(req)) || (conf.IsEnableLogin() && GetUsernameByToken(req.GetToken()) == "") {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user