mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-17 22:04:56 +00:00
feat: wire up asn and geoip checkers
Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
@@ -91,7 +91,9 @@ func (b BotConfig) Valid() error {
|
||||
allFieldsEmpty := b.UserAgentRegex == nil &&
|
||||
b.PathRegex == nil &&
|
||||
len(b.RemoteAddr) == 0 &&
|
||||
len(b.HeadersRegex) == 0
|
||||
len(b.HeadersRegex) == 0 &&
|
||||
b.ASNs == nil &&
|
||||
b.GeoIP == nil
|
||||
|
||||
if allFieldsEmpty && b.Expression == nil {
|
||||
errs = append(errs, ErrBotMustHaveUserAgentOrPath)
|
||||
|
||||
Reference in New Issue
Block a user