feat(botfilter): add containsToken

This commit is contained in:
hoelee committed 2026-04-15 09:58:00 +08:00
1 parent 8818694d21
commit 2f0b3534e6
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
}