浏览代码

[Minor] Allow to restore the previous behaviour in asn module

tags/1.7.7
Vsevolod Stakhov 6 年前
父节点
当前提交
704d1496b6
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      src/plugins/lua/asn.lua

+ 2
- 1
src/plugins/lua/asn.lua 查看文件

@@ -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


正在加载...
取消
保存