mirror of
https://github.com/containous/traefik.git
synced 2025-03-19 18:50:12 +03:00
Merge pull request #660 from JayH5/acme-renew-30-days
ACME: renew certificates 30 days before expiry
This commit is contained in:
commit
52737e91e5
@ -152,8 +152,8 @@ func (dc *DomainsCertificate) needRenew() bool {
|
||||
// If there's an error, we assume the cert is broken, and needs update
|
||||
return true
|
||||
}
|
||||
// <= 7 days left, renew certificate
|
||||
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 7 * time.Hour))) {
|
||||
// <= 30 days left, renew certificate
|
||||
if crt.NotAfter.Before(time.Now().Add(time.Duration(24 * 30 * time.Hour))) {
|
||||
return true
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user