all repos — website @ e2b10dee160b5b1a7e06dfb34c137d2a43bccd91

My website

tls: fix certmagic non-DNS challenges
Alan Pearce alan@alanpearce.eu
Sun, 05 Jan 2025 12:32:58 +0100
commit

e2b10dee160b5b1a7e06dfb34c137d2a43bccd91

parent

3ba6a311435bbb114b46fee8625dbab87c8a3e4c

1 files changed, 3 insertions(+), 3 deletions(-)

jump to
M internal/server/tls.gointernal/server/tls.go
@@ -33,15 +33,15 @@ 	wildcardDomain := "*." + s.config.WildcardDomain
 	certificateDomains := slices.Clone(s.config.Domains)
 
+	certmagic.HTTPPort = s.runtimeConfig.Port
+	certmagic.HTTPSPort = s.runtimeConfig.TLSPort
 	certmagic.Default.Logger = log.GetLogger().Named("certmagic")
 	cfg := certmagic.NewDefault()
 
-	acme := certmagic.DefaultACME
+	acme := &certmagic.DefaultACME
 	acme.Agreed = true
 	acme.Email = s.config.Email
 	acme.ListenHost = s.runtimeConfig.ListenAddress
-	acme.AltHTTPPort = s.runtimeConfig.Port
-	acme.AltTLSALPNPort = s.runtimeConfig.TLSPort
 
 	if s.runtimeConfig.Development {
 		ca := s.runtimeConfig.ACMECA