log-search: Filter out user avatars.

This commit is contained in:
Alex Vandiver 2022-05-05 12:29:30 -07:00 committed by Tim Abbott
parent d3ae7480cc
commit da4ae3ff24
1 changed files with 3 additions and 0 deletions

View File

@ -57,6 +57,7 @@ def parser() -> argparse.ArgumentParser:
)
filtering.add_argument("--static", "-s", help="Include static file paths", action="store_true")
filtering.add_argument("--uploads", "-u", help="Include file upload paths", action="store_true")
filtering.add_argument("--avatars", "-a", help="Include avatar paths", action="store_true")
filtering.add_argument("--events", "-e", help="Include event fetch paths", action="store_true")
filtering.add_argument("--messages", "-m", help="Include message paths", action="store_true")
filtering.add_argument(
@ -255,6 +256,8 @@ def passes_filters(
return False
if path.startswith("/user_uploads/") and not args.uploads:
return False
if path.startswith(("/user_avatars/", "/avatar/")) and not args.avatars:
return False
if re.match(r"/(json|api/v1)/events($|\?|/)", path) and not args.events:
return False
if path in ("/api/v1/typing", "/json/typing") and not args.typing: