mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-10-08 06:26:38 +08:00
fix: Fix the issue with AI proxy certificate res error (#7983)
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after -8s
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after -8s
This commit is contained in:
parent
6c8d48c2dc
commit
1c052b7c13
4 changed files with 10 additions and 8 deletions
|
@ -36,9 +36,10 @@ type OllamaBindDomainReq struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
type OllamaBindDomainRes struct {
|
type OllamaBindDomainRes struct {
|
||||||
Domain string `json:"domain"`
|
Domain string `json:"domain"`
|
||||||
SSLID uint `json:"sslID"`
|
SSLID uint `json:"sslID"`
|
||||||
AllowIPs []string `json:"allowIPs"`
|
AcmeAccountID uint `json:"acmeAccountID"`
|
||||||
WebsiteID uint `json:"websiteID"`
|
AllowIPs []string `json:"allowIPs"`
|
||||||
ConnUrl string `json:"connUrl"`
|
WebsiteID uint `json:"websiteID"`
|
||||||
|
ConnUrl string `json:"connUrl"`
|
||||||
}
|
}
|
||||||
|
|
|
@ -297,6 +297,8 @@ func (u *AIToolService) GetBindDomain(req dto.OllamaBindDomainReq) (*dto.OllamaB
|
||||||
res.Domain = website.PrimaryDomain
|
res.Domain = website.PrimaryDomain
|
||||||
if website.WebsiteSSLID > 0 {
|
if website.WebsiteSSLID > 0 {
|
||||||
res.SSLID = website.WebsiteSSLID
|
res.SSLID = website.WebsiteSSLID
|
||||||
|
ssl, _ := websiteSSLRepo.GetFirst(commonRepo.WithByID(website.WebsiteSSLID))
|
||||||
|
res.AcmeAccountID = ssl.AcmeAccountID
|
||||||
}
|
}
|
||||||
res.ConnUrl = fmt.Sprintf("%s://%s", strings.ToLower(website.Protocol), website.PrimaryDomain)
|
res.ConnUrl = fmt.Sprintf("%s://%s", strings.ToLower(website.Protocol), website.PrimaryDomain)
|
||||||
res.AllowIPs = GetAllowIps(website)
|
res.AllowIPs = GetAllowIps(website)
|
||||||
|
|
|
@ -104,6 +104,7 @@ export namespace AI {
|
||||||
export interface BindDomainRes {
|
export interface BindDomainRes {
|
||||||
domain: string;
|
domain: string;
|
||||||
sslID: number;
|
sslID: number;
|
||||||
|
acmeAccountID: number;
|
||||||
allowIPs: string[];
|
allowIPs: string[];
|
||||||
websiteID?: number;
|
websiteID?: number;
|
||||||
connUrl: string;
|
connUrl: string;
|
||||||
|
|
|
@ -202,9 +202,6 @@ const listSSL = () => {
|
||||||
const listAcmeAccount = () => {
|
const listAcmeAccount = () => {
|
||||||
SearchAcmeAccount({ page: 1, pageSize: 100 }).then((res) => {
|
SearchAcmeAccount({ page: 1, pageSize: 100 }).then((res) => {
|
||||||
acmeAccounts.value = res.data.items || [];
|
acmeAccounts.value = res.data.items || [];
|
||||||
if (acmeAccounts.value.length > 0) {
|
|
||||||
req.value.acmeAccountID = acmeAccounts.value[0].id;
|
|
||||||
}
|
|
||||||
listSSL();
|
listSSL();
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
@ -238,6 +235,7 @@ const search = async (appInstallID: number) => {
|
||||||
if (res.data.sslID > 0) {
|
if (res.data.sslID > 0) {
|
||||||
req.value.enableSSL = true;
|
req.value.enableSSL = true;
|
||||||
req.value.sslID = res.data.sslID;
|
req.value.sslID = res.data.sslID;
|
||||||
|
req.value.acmeAccountID = res.data.acmeAccountID;
|
||||||
listAcmeAccount();
|
listAcmeAccount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue