feat(botfilter): add pathMatchesAny

This commit is contained in:
hoelee committed 2026-04-16 10:05:00 +08:00
1 parent 20b3e7f4ab
commit 850ed4ea48
1 file changed
+9
+9
View File
@@ -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
}