Changeset

12219:0a44def211fa

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.
author Kim Alvefur <zash@zash.se>
date Thu, 27 Jan 2022 16:23:26 +0100
parents 12218:0795e1ccf3d8
children 12220:25b853e64d83
files util/prosodyctl/cert.lua
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/util/prosodyctl/cert.lua	Thu Jan 27 12:52:01 2022 +0100
+++ b/util/prosodyctl/cert.lua	Thu Jan 27 16:23:26 2022 +0100
@@ -201,6 +201,10 @@
 			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