aboutsummaryrefslogtreecommitdiffstats
path: root/lualib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rspamd.com>2024-06-08 14:40:57 +0100
committerVsevolod Stakhov <vsevolod@rspamd.com>2024-06-08 14:40:57 +0100
commit51533ebeb2fa1b7689d55f91579f1f6094a64bdf (patch)
treef253299a23640e6ef67af82fdcc456f7424144c9 /lualib
parenta7a3d24987156f3883563c5c03e020ab572da597 (diff)
downloadrspamd-51533ebeb2fa1b7689d55f91579f1f6094a64bdf.tar.gz
rspamd-51533ebeb2fa1b7689d55f91579f1f6094a64bdf.zip
[Minor] Allow `options.upstreams` to be used as well
Diffstat (limited to 'lualib')
-rw-r--r--lualib/lua_cfg_transform.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/lualib/lua_cfg_transform.lua b/lualib/lua_cfg_transform.lua
index d6243ade1..02d8526e5 100644
--- a/lualib/lua_cfg_transform.lua
+++ b/lualib/lua_cfg_transform.lua
@@ -630,5 +630,10 @@ return function(cfg)
cfg.emails = {}
end
+ -- Common misprint options.upstreams -> options.upstream
+ if type(cfg.options) == 'table' and type(cfg.options.upstreams) == 'table' and not cfg.options.upstream then
+ cfg.options.upstream = cfg.options.upstreams
+ end
+
return ret, cfg
end