mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2026-01-06 15:55:48 +08:00
删除IP名单中某个IP时,也会删除WAF保存在内存中的名单中的IP
This commit is contained in:
@@ -80,6 +80,14 @@ func (this *IPList) Contains(ipType string, scope firewallconfigs.FirewallScope,
|
||||
return ok
|
||||
}
|
||||
|
||||
// RemoveIP 删除IP
|
||||
// 暂时没办法清除某个服务相关的IP
|
||||
func (this *IPList) RemoveIP(ip string) {
|
||||
this.locker.Lock()
|
||||
delete(this.ipMap, "*@"+ip+"@"+IPTypeAll)
|
||||
this.locker.Unlock()
|
||||
}
|
||||
|
||||
func (this *IPList) remove(id int64) {
|
||||
this.locker.Lock()
|
||||
ip, ok := this.idMap[id]
|
||||
|
||||
Reference in New Issue
Block a user