feat(botfilter): add pathMatches

This commit is contained in:
hoelee committed 2026-01-14 18:44:00 +08:00
1 parent 5b92205611
commit 116ffa5615
1 file changed
+4
+4
View File
@@ -118,3 +118,7 @@ func requestPaths(r *http.Request) []string {
return result
}
func pathMatches(path, rule string) bool {
return path == rule || strings.HasPrefix(path, rule+"/")
}