mirror of
https://gitee.com/samwaf/SamWaf.git
synced 2026-10-31 02:01:44 +08:00
增加weblog的create_time的索引
This commit is contained in:
@@ -12,7 +12,7 @@ type WebLog struct {
|
||||
COUNTRY string `json:"country"`
|
||||
PROVINCE string `json:"province"`
|
||||
CITY string `json:"city"`
|
||||
CREATE_TIME string `json:"create_time"`
|
||||
CREATE_TIME string `gorm:"index:idx_weblog_time" json:"create_time"`
|
||||
CONTENT_LENGTH int64 `json:"content_length"`
|
||||
COOKIES string `json:"cookies"`
|
||||
BODY string `json:"body"`
|
||||
|
||||
@@ -64,8 +64,6 @@ func main() {
|
||||
//说明该code有更新
|
||||
hostRuleChan <- ruleconfig
|
||||
|
||||
} else {
|
||||
zlog.Debug("主机host" + code + " 有最新规则")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +86,7 @@ func main() {
|
||||
s.StartAsync()
|
||||
|
||||
//脱敏处理初始化
|
||||
global.GWAF_DLP, _ = dlp.NewEngine("my")
|
||||
global.GWAF_DLP, _ = dlp.NewEngine("wafDlp")
|
||||
global.GWAF_DLP.ApplyConfigDefault()
|
||||
for {
|
||||
select {
|
||||
@@ -96,7 +94,7 @@ func main() {
|
||||
//TODO 需要把删除的那部分数据从数据口里面去掉
|
||||
hostTarget[hostCode[remoteConfig[0].HostCode]].RuleData = remoteConfig
|
||||
hostTarget[hostCode[remoteConfig[0].HostCode]].Rule.LoadRules(remoteConfig)
|
||||
zlog.Debug("远程配置", zap.Any("remoteconfig", remoteConfig))
|
||||
zlog.Debug("远程配置", zap.Any("remoteConfig", remoteConfig))
|
||||
break
|
||||
|
||||
case engineStatus := <-engineChan:
|
||||
|
||||
@@ -279,6 +279,7 @@ func modifyResponse() func(*http.Response) error {
|
||||
oldBytes, err := io.ReadAll(reader)
|
||||
if err != nil {
|
||||
zlog.Error("error", err)
|
||||
return nil
|
||||
}
|
||||
|
||||
// body 追加内容
|
||||
|
||||
Reference in New Issue
Block a user