mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-23 18:49:21 +08:00
feat: 优化泛域名申请证书手动解析值 (#5950)
Refs https://github.com/1Panel-dev/1Panel/issues/4609
This commit is contained in:
parent
3b057f2c27
commit
50efe607d4
@ -4,6 +4,7 @@ import (
|
||||
"crypto"
|
||||
"encoding/json"
|
||||
"os"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/1Panel-dev/1Panel/backend/app/model"
|
||||
@ -292,8 +293,12 @@ func (c *AcmeClient) GetDNSResolve(domains []string) (map[string]Resolve, error)
|
||||
continue
|
||||
}
|
||||
challengeInfo := dns01.GetChallengeInfo(domain, keyAuth)
|
||||
fqdn := challengeInfo.FQDN
|
||||
if strings.HasPrefix(domain, "*.") && strings.Contains(fqdn, "*.") {
|
||||
fqdn = strings.Replace(fqdn, "*.", "", 1)
|
||||
}
|
||||
resolves[domain] = Resolve{
|
||||
Key: challengeInfo.FQDN,
|
||||
Key: fqdn,
|
||||
Value: challengeInfo.Value,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user