add general search filter

This commit is contained in:
pascal
2026-02-11 16:38:31 +01:00
parent d069145bd1
commit 1ffe8deb10
3 changed files with 18 additions and 0 deletions

View File

@@ -21,6 +21,7 @@ type AccessLogFilter struct {
PageSize int
// Filtering parameters
Search *string // General search across host, path, source IP, and user fields
SourceIP *string // Filter by source IP address
Host *string // Filter by host header
Path *string // Filter by request path (supports LIKE pattern)
@@ -54,6 +55,10 @@ func (f *AccessLogFilter) ParseFromRequest(r *http.Request) {
}
}
if search := queryParams.Get("search"); search != "" {
f.Search = &search
}
if sourceIP := queryParams.Get("source_ip"); sourceIP != "" {
f.SourceIP = &sourceIP
}