feat(botfilter): add matchesBlockedExtension

This commit is contained in:
hoelee committed 2026-04-16 08:08:00 +08:00
1 parent 9030bb6102
commit 20b3e7f4ab
1 file changed
+11
+11
View File
@@ -68,3 +68,14 @@ func matchesBlockedPath(paths, blockedPaths []string) bool {
return false
}
func matchesBlockedExtension(paths, extensions []string) bool {
for _, requestPath := range paths {
for _, extension := range extensions {
if strings.HasSuffix(requestPath, extension) {
return true
}
}
}
return false
}