mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-12-08 19:00:54 +08:00
WAF动作record_ip返回403/优化关闭连接方法
This commit is contained in:
@@ -90,7 +90,9 @@ func (this *RecordIPAction) Perform(waf *WAF, group *RuleGroup, set *RuleSet, re
|
||||
expiredAt := time.Now().Unix() + int64(timeout)
|
||||
|
||||
if this.Type == "black" {
|
||||
_ = this.CloseConn(writer)
|
||||
writer.WriteHeader(http.StatusForbidden)
|
||||
|
||||
request.WAFClose()
|
||||
|
||||
SharedIPBlackList.Add(IPTypeAll, request.WAFRemoteIP(), expiredAt)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user