]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Allow `options.upstreams` to be used as well 5007/head
authorVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 8 Jun 2024 13:40:57 +0000 (14:40 +0100)
committerVsevolod Stakhov <vsevolod@rspamd.com>
Sat, 8 Jun 2024 13:40:57 +0000 (14:40 +0100)
lualib/lua_cfg_transform.lua

index d6243ade1e1769ddac0a0e536ca4c7d37290415b..02d8526e5bfafe9f1dc66d505033a140a3829409 100644 (file)
@@ -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