diff --git a/backend/app/service/website_ssl.go b/backend/app/service/website_ssl.go index f8acef662..2be4ec514 100644 --- a/backend/app/service/website_ssl.go +++ b/backend/app/service/website_ssl.go @@ -83,6 +83,8 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs return res, err } + var websiteSSL model.WebsiteSSL + switch create.Provider { case constant.DNSAccount: dnsAccount, err := websiteDnsRepo.GetFirst(commonRepo.WithByID(create.DnsAccountID)) @@ -92,6 +94,7 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs if err := client.UseDns(ssl.DnsType(dnsAccount.Type), dnsAccount.Authorization); err != nil { return res, err } + websiteSSL.AutoRenew = create.AutoRenew case constant.Http: appInstall, err := getAppInstallByKey(constant.AppOpenresty) if err != nil { @@ -100,6 +103,7 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs if err := client.UseHTTP(path.Join(constant.AppInstallDir, constant.AppOpenresty, appInstall.Name, "root")); err != nil { return res, err } + websiteSSL.AutoRenew = create.AutoRenew case constant.DnsManual: if err := client.UseManualDns(); err != nil { return res, err @@ -115,7 +119,7 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs if err != nil { return res, err } - var websiteSSL model.WebsiteSSL + websiteSSL.DnsAccountID = create.DnsAccountID websiteSSL.AcmeAccountID = acmeAccount.ID websiteSSL.Provider = create.Provider @@ -133,7 +137,6 @@ func (w WebsiteSSLService) Create(create request.WebsiteSSLCreate) (request.Webs websiteSSL.StartDate = cert.NotBefore websiteSSL.Type = cert.Issuer.CommonName websiteSSL.Organization = cert.Issuer.Organization[0] - websiteSSL.AutoRenew = create.AutoRenew if err := websiteSSLRepo.Create(context.TODO(), &websiteSSL); err != nil { return res, err diff --git a/frontend/src/api/modules/website.ts b/frontend/src/api/modules/website.ts index 7f083b7c5..c9af4c914 100644 --- a/frontend/src/api/modules/website.ts +++ b/frontend/src/api/modules/website.ts @@ -100,7 +100,7 @@ export const ListSSL = (req: Website.SSLReq) => { }; export const CreateSSL = (req: Website.SSLCreate) => { - return http.post(`/websites/ssl`, req); + return http.post(`/websites/ssl`, req, 60000); }; export const DeleteSSL = (req: Website.DelReq) => { @@ -128,7 +128,7 @@ export const UpdateSSL = (req: Website.SSLUpdate) => { }; export const GetDnsResolve = (req: Website.DNSResolveReq) => { - return http.post(`/websites/ssl/resolve`, req); + return http.post(`/websites/ssl/resolve`, req, 60000); }; export const GetHTTPSConfig = (id: number) => { diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index d96a5f2ee..9641b5df4 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1110,7 +1110,7 @@ const message = { primaryPath: 'Main directory', folderTitle: 'The main directory of the website mainly contains four folders', wafFolder: 'Firewall Rules', - indexFolder: 'Static website root directory', + indexFolder: 'Website root directory', logFoler: 'website log', sslFolder: 'Website certificate', enableOrNot: 'Enable', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index a1ea96f06..2a1731025 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1106,7 +1106,7 @@ const message = { primaryPath: '主目录', folderTitle: '网站主目录主要包含四个文件夹', wafFolder: '防火墙规则', - indexFolder: '静态网站root目录', + indexFolder: '网站root目录', logFoler: '网站日志', sslFolder: '网站证书', enableOrNot: '是否启用',