# HG changeset patch # User Kim Alvefur # Date 1620230084 -7200 # Node ID fb9bd9fa435656abf10c28a6e9642bc1adf68e73 # Parent 180c5951e7e470145c487316a160cfdc366f041e core.portmanager: Use existing http_host for https SNI mapping diff -r 180c5951e7e4 -r fb9bd9fa4356 core/portmanager.lua --- 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);