feat(botfilter): add pathMatchesAny
This commit is contained in:
1 parent
20b3e7f4ab
commit
850ed4ea48
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