From 958f94a2447c8d4aacb3e103f197a6694767d69c Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 14 Jan 2021 15:30:58 +0800 Subject: [PATCH] 1 --- server/analyseapi/riskmgr.go | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index b321a24..a0967d6 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -128,6 +128,7 @@ func (this *RiskMgr) GetGameConf(gameId int32, channel int32) *GameConf { func (this *RiskMgr) _analyseIsOpen(c *f5.Context) { var gameConf *GameConf responseStr := "" + launchInfo := "" isPass := func () bool { if c.Method() != "POST" { atomic.AddInt64(&this.totalHttpMethodBlockTimes, 1) @@ -155,7 +156,7 @@ func (this *RiskMgr) _analyseIsOpen(c *f5.Context) { remoteAddr = c.Request("ip").GetString() } - launchInfo := c.GetBody().GetString() + launchInfo = c.GetBody().GetString() if gameConf.IsPass(remoteAddr, launchInfo, &responseStr) { atomic.AddInt64(&gameConf.passTimes, 1) atomic.AddInt64(&gameConf.totalPassTimes, 1) @@ -181,7 +182,10 @@ func (this *RiskMgr) _analyseIsOpen(c *f5.Context) { } else { c.ResponseInt32Ok("is_open", 1) } - f5.SysLog().Info("time:%d analyse pass:%s", q5.GetTickCount() - beginTick, responseStr) + f5.SysLog().Info("time:%d analyse pass:%s launch:%s", + q5.GetTickCount() - beginTick, + responseStr, + launchInfo) } else { atomic.AddInt64(&this.totalBlockTimes, 1) atomic.AddInt64(&this.blockTimes, 1) @@ -196,7 +200,10 @@ func (this *RiskMgr) _analyseIsOpen(c *f5.Context) { } else { c.ResponseInt32Ok("is_open", 0) } - f5.SysLog().Warning("time:%d analyse block:%s", q5.GetTickCount() - beginTick, responseStr) + f5.SysLog().Warning("time:%d analyse block:%s launch:%s", + q5.GetTickCount() - beginTick, + responseStr, + launchInfo) } }