From 2f0b3534e6549420165937e91aaa8cdd4f473885 Mon Sep 17 00:00:00 2001 From: hoelee Date: Wed, 15 Apr 2026 09:58:00 +0800 Subject: [PATCH] feat(botfilter): add containsToken --- matcher.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/matcher.go b/matcher.go index f83abcfa..94d6c5ec 100644 --- a/matcher.go +++ b/matcher.go @@ -50,3 +50,12 @@ func inspectRequest(r *http.Request, cfg *compiledConfig) matchResult { return result } +func containsToken(value string, tokens []string) bool { + for _, token := range tokens { + if strings.Contains(value, token) { + return true + } + } + return false +} +