mirror of
https://github.com/mjl-/mox.git
synced 2025-03-24 18:54:47 +03:00
ensure kind "acme-tls-alpn-01" is registered on the http handler
previous code couldn't possibly be triggered by my reading. encountered during PR #255
This commit is contained in:
parent
eb88e2651a
commit
b8bf99e082
1 changed files with 5 additions and 4 deletions
|
@ -596,12 +596,13 @@ func portServes(l config.Listener) map[int]*serve {
|
|||
|
||||
if https && l.TLS.ACME != "" {
|
||||
s.TLSConfig = l.TLS.ACMEConfig
|
||||
} else if https {
|
||||
s.TLSConfig = l.TLS.Config
|
||||
if l.TLS.ACME != "" {
|
||||
tlsport := config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443)
|
||||
|
||||
tlsport := config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443)
|
||||
if portServe[tlsport] == nil || !slices.Contains(portServe[tlsport].Kinds, "acme-tls-alpn-01") {
|
||||
ensureServe(true, tlsport, "acme-tls-alpn-01", false)
|
||||
}
|
||||
} else if https {
|
||||
s.TLSConfig = l.TLS.Config
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue