Fix indentation

This commit is contained in:
Monviech 2025-10-04 05:26:22 +00:00
parent 775c0ac7ca
commit 69efaea8c9

View file

@ -612,14 +612,14 @@ func fillInGlobalACMEDefaults(issuer certmagic.Issuer, options map[string]any) e
// In BSD it is valid to bind to the wildcard socket even though a more selective socket is already open (still unexpected behavior by the caller though) // In BSD it is valid to bind to the wildcard socket even though a more selective socket is already open (still unexpected behavior by the caller though)
// In Linux the same call will error with EADDRINUSE whenever the listener for the automation policy is opened // In Linux the same call will error with EADDRINUSE whenever the listener for the automation policy is opened
if acmeIssuer.Challenges == nil { if acmeIssuer.Challenges == nil {
acmeIssuer.Challenges = new(caddytls.ChallengesConfig) acmeIssuer.Challenges = new(caddytls.ChallengesConfig)
} }
if acmeIssuer.Challenges.BindHost == "" { if acmeIssuer.Challenges.BindHost == "" {
if defBinds, ok := options["default_bind"].([]ConfigValue); ok && len(defBinds) > 0 { if defBinds, ok := options["default_bind"].([]ConfigValue); ok && len(defBinds) > 0 {
if abp, ok := defBinds[0].Value.(addressesWithProtocols); ok && len(abp.addresses) > 0 { if abp, ok := defBinds[0].Value.(addressesWithProtocols); ok && len(abp.addresses) > 0 {
acmeIssuer.Challenges.BindHost = abp.addresses[0] acmeIssuer.Challenges.BindHost = abp.addresses[0]
}
} }
}
} }
if globalCertLifetime != nil && acmeIssuer.CertificateLifetime == 0 { if globalCertLifetime != nil && acmeIssuer.CertificateLifetime == 0 {
acmeIssuer.CertificateLifetime = globalCertLifetime.(caddy.Duration) acmeIssuer.CertificateLifetime = globalCertLifetime.(caddy.Duration)