Skip to content

Commit

Permalink
v0.14.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gotoeasy committed Jan 10, 2024
1 parent e02f314 commit ee48588
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions glc/www/controller/log_search_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ func LogSearchController(req *gweb.HttpRequest) *gweb.HttpResult {
username = GetUsernameByToken(token)
catchSession.Set(token, username) // 会话重新计时
}
SetOrigin(req)

// 准备好各种场景的检索条件(系统【~】、日志级别【!】、用户【@】)
startTime := time.Now()
Expand Down
8 changes: 7 additions & 1 deletion glc/www/controller/storage_mnt_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()) == "") {
Expand Down

0 comments on commit ee48588

Please sign in to comment.