feat(botfilter): add containsToken

This commit is contained in:
hoelee committed 2026-04-15 09:58:00 +08:00
1 parent 7e5d7fde58
commit 9004b917be
1 file changed
+9
+9
View File
@@ -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
}