From 850ed4ea48bd6a7c61161f0edc936813b69a4e55 Mon Sep 17 00:00:00 2001 From: hoelee Date: Thu, 16 Apr 2026 10:05:00 +0800 Subject: [PATCH] feat(botfilter): add pathMatchesAny --- matcher.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/matcher.go b/matcher.go index 8c99b45b..80a852a7 100644 --- a/matcher.go +++ b/matcher.go @@ -79,3 +79,12 @@ func matchesBlockedExtension(paths, extensions []string) bool { return false } +func pathMatchesAny(requestPath string, rules []string) bool { + for _, rule := range rules { + if pathMatches(requestPath, rule) { + return true + } + } + return false +} +