commit cc656e6: [Minor] Use upstream in the dkim signing tools

Vsevolod Stakhov vsevolod at rspamd.com
Tue Jul 5 18:42:03 UTC 2022


Author: Vsevolod Stakhov
Date: 2022-07-05 19:41:10 +0100
URL: https://github.com/rspamd/rspamd/commit/cc656e6ecc96392238009a9393b0ee3107f16929 (HEAD -> master)

[Minor] Use upstream in the dkim signing tools

---
 lualib/lua_dkim_tools.lua | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lualib/lua_dkim_tools.lua b/lualib/lua_dkim_tools.lua
index 21794a570..719b52067 100644
--- a/lualib/lua_dkim_tools.lua
+++ b/lualib/lua_dkim_tools.lua
@@ -619,6 +619,7 @@ exports.sign_using_vault = function(N, task, settings, selectors, sign_func, err
 
   local full_url = string.format('%s/v1/%s/%s',
       settings.vault_url, settings.vault_path or 'dkim', selectors.domain)
+  local upstream_list = lua_util.http_upstreams_by_url(rspamd_config:get_mempool(), settings.vault_url)
 
   local function vault_callback(err, code, body, _)
     if code ~= 200 then
@@ -683,6 +684,7 @@ exports.sign_using_vault = function(N, task, settings, selectors, sign_func, err
     timeout = settings.http_timeout or 5.0,
     no_ssl_verify = settings.no_ssl_verify,
     keepalive = true,
+    upstream = upstream_list and upstream_list:get_upstream_round_robin() or nil,
     headers = {
       ['X-Vault-Token'] = settings.vault_token,
     },


More information about the Commits mailing list