mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-28 05:15:04 +08:00
fix: 解决自签证书填写 IP 不显示的问题 (#3200)
This commit is contained in:
parent
b1e4ad9bfc
commit
a74ed6a317
@ -244,6 +244,21 @@ func (w WebsiteCAService) ObtainSSL(req request.WebsiteCAObtain) (*model.Website
|
||||
websiteSSL.PrimaryDomain = domains[0]
|
||||
websiteSSL.Domains = strings.Join(domains[1:], ",")
|
||||
}
|
||||
ipStrings := make([]string, len(ips))
|
||||
for i, ip := range ips {
|
||||
ipStrings[i] = ip.String()
|
||||
}
|
||||
if websiteSSL.PrimaryDomain == "" && len(ips) > 0 {
|
||||
websiteSSL.PrimaryDomain = ipStrings[0]
|
||||
ipStrings = ipStrings[1:]
|
||||
}
|
||||
if len(ipStrings) > 0 {
|
||||
if websiteSSL.Domains != "" {
|
||||
websiteSSL.Domains += ","
|
||||
}
|
||||
websiteSSL.Domains += strings.Join(ipStrings, ",")
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -95,8 +95,8 @@ const initData = () => ({
|
||||
keyType: 'P256',
|
||||
domains: '',
|
||||
id: 0,
|
||||
time: 0,
|
||||
unit: 'day',
|
||||
time: 10,
|
||||
unit: 'year',
|
||||
pushDir: false,
|
||||
dir: '',
|
||||
autoRenew: true,
|
||||
|
Loading…
Reference in New Issue
Block a user