diff options
author | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-12-17 20:38:24 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rspamd.com> | 2022-12-17 20:38:24 +0000 |
commit | 2fed77b9c674610da6d498e40358a475c44c5415 (patch) | |
tree | f1006d2448b1743ae8900104b35a22e04203e11a /lualib/lua_maps.lua | |
parent | d2c7100dfcb89589969fdcf01d06d1d8dec2e816 (diff) | |
download | rspamd-2fed77b9c674610da6d498e40358a475c44c5415.tar.gz rspamd-2fed77b9c674610da6d498e40358a475c44c5415.zip |
[Minor] Apply lua augmentations where available
Diffstat (limited to 'lualib/lua_maps.lua')
-rw-r--r-- | lualib/lua_maps.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lualib/lua_maps.lua b/lualib/lua_maps.lua index a436a60f0..362f54365 100644 --- a/lualib/lua_maps.lua +++ b/lualib/lua_maps.lua @@ -449,6 +449,14 @@ local function rspamd_map_add_from_ucl(opt, mtype, description, callback) parse_err) end else + -- Adjust lua specific augmentations in a trivial case + if type(opt.url) == 'string' then + local nsrc,ntype = maybe_adjust_type(opt.url, mtype) + if nsrc and ntype then + opt.url = nsrc + mtype = ntype + end + end -- We have some non-trivial object so let C code to deal with it somehow... local map = rspamd_config:add_map{ type = mtype, |