From 2fed77b9c674610da6d498e40358a475c44c5415 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 17 Dec 2022 20:38:24 +0000 Subject: [PATCH] [Minor] Apply lua augmentations where available --- lualib/lua_maps.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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, -- 2.39.5