mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 06:28:14 +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
@ -596,12 +596,13 @@ func portServes(l config.Listener) map[int]*serve {
|
|||||||
|
|
||||||
if https && l.TLS.ACME != "" {
|
if https && l.TLS.ACME != "" {
|
||||||
s.TLSConfig = l.TLS.ACMEConfig
|
s.TLSConfig = l.TLS.ACMEConfig
|
||||||
} else if https {
|
|
||||||
s.TLSConfig = l.TLS.Config
|
tlsport := config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443)
|
||||||
if l.TLS.ACME != "" {
|
if portServe[tlsport] == nil || !slices.Contains(portServe[tlsport].Kinds, "acme-tls-alpn-01") {
|
||||||
tlsport := config.Port(mox.Conf.Static.ACME[l.TLS.ACME].Port, 443)
|
|
||||||
ensureServe(true, tlsport, "acme-tls-alpn-01", false)
|
ensureServe(true, tlsport, "acme-tls-alpn-01", false)
|
||||||
}
|
}
|
||||||
|
} else if https {
|
||||||
|
s.TLSConfig = l.TLS.Config
|
||||||
}
|
}
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user