mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-10 20:40:56 +08:00
使用IPv6的IP搜索访问日志时自动去掉[]
This commit is contained in:
@@ -417,6 +417,9 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// 去掉IPv6的[]
|
||||
ip = strings.Trim(ip, "[]")
|
||||
|
||||
query.Attr("remoteAddr", ip)
|
||||
query.UseIndex("remoteAddr")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user