mirror of https://github.com/allinssl/allinssl
修复1panel网站部署
parent
9e6a8d0a68
commit
ea3a182919
|
@ -95,7 +95,7 @@ func Request1panel(data *map[string]any, method, providerID, requestUrl string)
|
||||||
return nil, fmt.Errorf("证书部署失败")
|
return nil, fmt.Errorf("证书部署失败")
|
||||||
}
|
}
|
||||||
if code != 200 {
|
if code != 200 {
|
||||||
msg, ok := res["msg"].(string)
|
msg, ok := res["message"].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("证书部署失败")
|
return nil, fmt.Errorf("证书部署失败")
|
||||||
}
|
}
|
||||||
|
@ -184,7 +184,7 @@ func Deploy1panelSite(cfg map[string]any) error {
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("获取网站参数失败: data")
|
return fmt.Errorf("获取网站参数失败: data")
|
||||||
}
|
}
|
||||||
SSLProtocol, ok := siteData["SSLProtocol"].(string)
|
SSLProtocol, ok := siteData["SSLProtocol"].([]any)
|
||||||
if !ok {
|
if !ok {
|
||||||
return fmt.Errorf("获取网站参数失败: data.SSLProtocol")
|
return fmt.Errorf("获取网站参数失败: data.SSLProtocol")
|
||||||
}
|
}
|
||||||
|
@ -216,10 +216,10 @@ func Deploy1panelSite(cfg map[string]any) error {
|
||||||
"enable": enable,
|
"enable": enable,
|
||||||
"hsts": hsts,
|
"hsts": hsts,
|
||||||
"httpConfig": httpConfig,
|
"httpConfig": httpConfig,
|
||||||
// "importType": "paste",
|
"importType": "paste",
|
||||||
"type": "manual",
|
"type": "manual",
|
||||||
"websiteId": websiteId,
|
"websiteId": websiteId,
|
||||||
}
|
}
|
||||||
_, err = Request1panel(&data, "POST", providerID, fmt.Sprintf("api/v1/websites/%s/https", siteId))
|
_, err = Request1panel(&data, "POST", providerID, fmt.Sprintf("api/v1/websites/%s/https", siteId))
|
||||||
return nil
|
return err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue