mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-24 13:56:57 +00:00
fix certs again
This commit is contained in:
parent
3a1ba2d5ac
commit
558b3f6075
1 changed files with 4 additions and 4 deletions
|
@ -192,13 +192,13 @@ func (c *AcmeClient) retrieveCertFromDB(sni, mainDomainSuffix string, useDnsProv
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
tlsCertificate.Leaf, err = leaf(&tlsCertificate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// TODO: document & put into own function
|
||||
if !strings.EqualFold(sni, mainDomainSuffix) {
|
||||
tlsCertificate.Leaf, err = leaf(&tlsCertificate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// renew certificates 7 days before they expire
|
||||
if tlsCertificate.Leaf.NotAfter.Before(time.Now().Add(7 * 24 * time.Hour)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue