Skip to content

Commit 4bbf3c9

Browse files
authored
fix: handle domain with wildcards (#690)
1 parent 9391c75 commit 4bbf3c9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

common/mylego/mylego.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ func (l *LegoCMD) RenewCert() (CertPath string, KeyPath string, ok bool, err err
149149
}
150150

151151
func checkCertFile(domain string) (string, string, error) {
152-
keyPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.key", domain))
153-
certPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.crt", domain))
152+
keyPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.key", sanitizedDomain(domain)))
153+
certPath := path.Join(defaultPath, "certificates", fmt.Sprintf("%s.crt", sanitizedDomain(domain)))
154154
if _, err := os.Stat(keyPath); os.IsNotExist(err) {
155155
return "", "", fmt.Errorf("cert key failed: %s", domain)
156156
}

0 commit comments

Comments
 (0)