feat(botfilter): add matchesBlockedExtension

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