feat(botfilter): add pathMatchesAny
This commit is contained in:
1 parent
4645416900
commit
c04d96dd3e
1 file changed
+9
@@ -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
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user