Merge 13.0->trunk

pull/27/head
Matthew Wild 9 months ago
commit 80d5f64ca0
  1. 4
      core/portmanager.lua

@ -253,10 +253,12 @@ local function add_sni_host(host, service)
-- TODO should this be some generic thing? e.g. in the service definition
alternate_host = config.get(host, "http_host");
end
local ssl, err, cfg = certmanager.create_context(alternate_host or host, "server", prefix_ssl_config, active_service.tls_cfg);
local autocert = certmanager.find_host_cert(alternate_host or host);
local ssl, err, cfg = certmanager.create_context(alternate_host or host, "server", prefix_ssl_config, autocert, active_service.tls_cfg);
if not ssl then
log("error", "Error creating TLS context for SNI host %s: %s", host, err);
else
log("debug", "Using certificate %s for %s (%s) on %s (%s)", cfg.certificate, service or name, name, alternate_host or host, host)
local ok, err = active_service.server:sslctx():set_sni_host(
alternate_host or host,
cfg.certificate,

Loading…
Cancel
Save