fix: Fix the issue of failing to save IPv6 self-signed certificate (#9495)

This commit is contained in:
CityFun 2025-07-11 17:35:39 +08:00 committed by GitHub
parent 2694a725d6
commit 7d5f0aa906
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View file

@ -524,7 +524,7 @@ func (w WebsiteSSLService) Update(update request.WebsiteSSLUpdate) error {
if update.OtherDomains != "" {
otherDomainArray := strings.Split(update.OtherDomains, "\n")
for _, domain := range otherDomainArray {
if !common.IsValidDomain(domain) {
if websiteSSL.Provider != constant.SelfSigned && !common.IsValidDomain(domain) {
return buserr.WithName("ErrDomainFormat", domain)
}
domains = append(domains, domain)

View file

@ -268,6 +268,9 @@ const acceptParams = (op: string, websiteSSL: Website.SSLDTO) => {
ssl.value.keyType = websiteSSL.keyType;
ssl.value.execShell = websiteSSL.execShell;
ssl.value.shell = websiteSSL.shell;
if (ssl.value.provider == 'selfSigned') {
rules.value.primaryDomain = [];
}
}
ssl.value.websiteId = Number(id.value);
getAcmeAccounts();