mirror of
https://github.com/traefik/traefik.git
synced 2025-09-27 00:31:14 +02:00
ACME: renew certificates 30 days before expiry, like the official certbot client
This commit is contained in:
parent
3c5605b793
commit
1872e2b63d
@ -152,8 +152,8 @@ func (dc *DomainsCertificate) needRenew() bool {
|
|||||||
// If there's an error, we assume the cert is broken, and needs update
|
// If there's an error, we assume the cert is broken, and needs update
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
// <= 7 days left, renew certificate
|
// <= 30 days left, renew certificate
|
||||||
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 7 * time.Hour))) {
|
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 30 * time.Hour))) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user