diff --git a/internal/db/models/http_access_log_dao.go b/internal/db/models/http_access_log_dao.go index cb3322be..6fea9f14 100644 --- a/internal/db/models/http_access_log_dao.go +++ b/internal/db/models/http_access_log_dao.go @@ -236,6 +236,10 @@ func (this *HTTPAccessLogDAO) listAccessLogs(tx *dbs.Tx, lastRequestId string, s query.Between("remoteAddr", pieces[0], pieces[1]) } } else { + if regexp.MustCompile(`^ip:.+`).MatchString(keyword) { + keyword = keyword[3:] + } + useOriginKeyword := false where := "JSON_EXTRACT(content, '$.remoteAddr') LIKE :keyword OR JSON_EXTRACT(content, '$.requestURI') LIKE :keyword OR JSON_EXTRACT(content, '$.host') LIKE :keyword"