feat(botfilter): add pathMatchesAny

This commit is contained in:
hoelee committed 2026-04-24 10:05:00 +08:00
1 parent 4645416900
commit c04d96dd3e
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
}