Check if ACME certificate resolver is not nil

This commit is contained in:
Kevin Pollet 2024-09-19 11:50:04 +02:00 committed by GitHub
parent 4b5968e0cc
commit ac42dd8f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,7 +40,7 @@ func NewRouterFactory(staticConfiguration static.Configuration, managerFactory *
) *RouterFactory {
handlesTLSChallenge := false
for _, resolver := range staticConfiguration.CertificatesResolvers {
if resolver.ACME.TLSChallenge != nil {
if resolver.ACME != nil && resolver.ACME.TLSChallenge != nil {
handlesTLSChallenge = true
break
}