mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
enhance: limit cert renewal interval between 7 to 21 days
This commit is contained in:
parent
49b41d6eb7
commit
e3876cffaf
2 changed files with 11 additions and 1 deletions
|
@ -60,7 +60,7 @@ func renew(certModel *model.Cert) {
|
|||
notification.Error("Renew Certificate Error", strings.Join(certModel.Domains, ", "))
|
||||
return
|
||||
}
|
||||
if int(time.Now().Sub(cert.NotBefore).Hours()/24) < settings.ServerSettings.CertRenewalInterval {
|
||||
if int(time.Now().Sub(cert.NotBefore).Hours()/24) < settings.ServerSettings.GetCertRenewalInterval() {
|
||||
// not after settings.ServerSettings.CertRenewalInterval, ignore
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue