feat: update suspicious activity display to show last 10 requests and improve database filtering

This commit is contained in:
Lorenzo Venerandi
2026-02-28 18:12:40 +01:00
parent 3d8178ff0e
commit 368265dea4
3 changed files with 9 additions and 5 deletions

View File

@@ -1767,7 +1767,11 @@ class DatabaseManager:
# Filter out local/private IPs and server IP, then sort
filtered = [
{"ip": row.ip, "count": row.count, "category": row.category or "unknown"}
{
"ip": row.ip,
"count": row.count,
"category": row.category or "unknown",
}
for row in results
if is_valid_public_ip(row.ip, server_ip)
]