@@ -33,6 +33,7 @@ local options = { | |||
symbol = 'ASN', | |||
expire = 86400, -- 1 day by default | |||
key_prefix = 'rasn', | |||
check_local = false, | |||
} | |||
local rspamd_re = rspamd_regexp.create_cached("[\\|\\s]") | |||
@@ -78,7 +79,7 @@ local function asn_check(task) | |||
end | |||
local ip = task:get_from_ip() | |||
if not (ip and ip:is_valid()) or ip:is_local() then return end | |||
if not (ip and ip:is_valid()) or (not options.check_local and ip:is_local()) then return end | |||
asn_check_func[options['provider_type']](ip) | |||
end | |||