From cc656e6ecc96392238009a9393b0ee3107f16929 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 5 Jul 2022 19:41:10 +0100 Subject: [PATCH] [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, }, -- 2.39.5