Skip to content

Commit

Permalink
fix: handle domain with wildcards (#690)
Browse files Browse the repository at this point in the history
  • Loading branch information
sakzri authored Oct 19, 2024
1 parent 9391c75 commit 4bbf3c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/mylego/mylego.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ func (l *LegoCMD) RenewCert() (CertPath string, KeyPath string, ok bool, err err
}

func checkCertFile(domain string) (string, string, error) {
keyPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.key", domain))
certPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.crt", domain))
keyPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.key", sanitizedDomain(domain)))
certPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.crt", sanitizedDomain(domain)))
if _, err := os.Stat(keyPath); os.IsNotExist(err) {
return "", "", fmt.Errorf("cert key failed: %s", domain)
}
Expand Down

0 comments on commit 4bbf3c9

Please sign in to comment.