From 116ffa561502ff98ea00f6fbfe9b5ea44a93f455 Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 14 Jan 2026 18:44:00 +0800 Subject: [PATCH] feat(botfilter): add pathMatches --- util.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/util.go b/util.go index 3e2ca885..69967412 100644 --- a/util.go +++ b/util.go @@ -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+"/") +} +