enableHTTPChallenge := true
enableTLSALPNChallenge := true
altHTTPPort := 0
+ altTLSALPNPort := 0
if p, err := strconv.Atoi(setting.PortToRedirect); err == nil {
altHTTPPort = p
}
+ if p, err := strconv.Atoi(setting.HTTPPort); err == nil {
+ altTLSALPNPort = p
+ }
magic := certmagic.NewDefault()
magic.Storage = &certmagic.FileStorage{Path: directory}
Agreed: setting.LetsEncryptTOS,
DisableHTTPChallenge: !enableHTTPChallenge,
DisableTLSALPNChallenge: !enableTLSALPNChallenge,
- ListenHost: listenAddr,
+ ListenHost: setting.HTTPAddr,
+ AltTLSALPNPort: altTLSALPNPort,
AltHTTPPort: altHTTPPort,
})