aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2022-01-27 16:23:26 +0100
committerKim Alvefur <zash@zash.se>2022-01-27 16:23:26 +0100
commitd607d2898fc63f08c4143efc07b8eff7bb2e42a4 (patch)
tree1b1a4a6e373577157d70ce690467e9b338f2a39f /util
parentcde551332e04d72a258006dda7db4beab84a2a60 (diff)
downloadprosody-d607d2898fc63f08c4143efc07b8eff7bb2e42a4.tar.gz
prosody-d607d2898fc63f08c4143efc07b8eff7bb2e42a4.zip
util.prosodyctl.cert: Look for certs matching 'http_host'
This should ensure any certificate needed for HTTP services will also be included in the certificate import.
Diffstat (limited to 'util')
-rw-r--r--util/prosodyctl/cert.lua4
1 files changed, 4 insertions, 0 deletions
diff --git a/util/prosodyctl/cert.lua b/util/prosodyctl/cert.lua
index a60a9647..59b6f982 100644
--- a/util/prosodyctl/cert.lua
+++ b/util/prosodyctl/cert.lua
@@ -201,6 +201,10 @@ function cert_commands.import(arg)
for host in pairs(prosody.hosts) do
if host ~= "*" and configmanager.get(host, "enabled") ~= false then
table.insert(hostnames, host);
+ local http_host = configmanager.get(host, "http_host") or host;
+ if http_host ~= host then
+ table.insert(hostnames, http_host);
+ end
end
end
end