mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-18 08:16:39 +00:00
add general search filter
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user