From c04d96dd3eaba008776f03021088d194820d5bf9 Mon Sep 17 00:00:00 2001 From: hoelee Date: Fri, 24 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 +} +