diff options
Diffstat (limited to 'src/plugins/lua/ratelimit.lua')
-rw-r--r-- | src/plugins/lua/ratelimit.lua | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/plugins/lua/ratelimit.lua b/src/plugins/lua/ratelimit.lua index a05ebc2e9..32b2ba2d4 100644 --- a/src/plugins/lua/ratelimit.lua +++ b/src/plugins/lua/ratelimit.lua @@ -528,15 +528,13 @@ if opts then end if opts['whitelisted_ip'] then - whitelisted_ip = rspamd_config:add_radix_map(opts['whitelisted_ip'], 'Ratelimit whitelist ip map') + whitelisted_ip = rspamd_map_add('ratelimit', 'whitelisted_ip', 'radix', + 'Ratelimit whitelist ip map') end if opts['whitelisted_user'] then - whitelisted_user = rspamd_config:add_map({ - ['url'] = opts['whitelisted_user'], - ['description'] = 'Ratelimit whitelist user map', - ['type'] = 'set' - }) + whitelisted_ip = rspamd_map_add('ratelimit', 'whitelisted_user', 'set', + 'Ratelimit whitelist user map') end if opts['symbol'] then |