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
2 changed files with 4 additions and 1 deletions
+1 -1
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)
@@ -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();