--- a/core/portmanager.lua Wed May 05 17:52:51 2021 +0200
+++ b/core/portmanager.lua Wed May 05 17:54:44 2021 +0200
@@ -238,6 +238,10 @@
if config_prefix == "_" then config_prefix = ""; end
local prefix_ssl_config = config.get(host, config_prefix.."ssl");
local alternate_host = service and config.get(host, service.."_host");
+ if not alternate_host and service == "https" then
+ -- TODO should this be some generic thing? e.g. in the service definition
+ alternate_host = config.get(host, "http_host");
+ end
local autocert = certmanager.find_host_cert(alternate_host or host);
-- luacheck: ignore 211/cfg
local ssl, err, cfg = certmanager.create_context(host, "server", prefix_ssl_config, autocert, active_service.tls_cfg);