mirror of https://github.com/1Panel-dev/1Panel
fix: 解决创建 Google Cloud Acme 账号失败的问题 (#3205)
parent
b6cbca36c2
commit
2fdca95255
|
@ -39,19 +39,20 @@ func (w WebsiteAcmeAccountService) Create(create request.WebsiteAcmeAccountCreat
|
||||||
if exist != nil {
|
if exist != nil {
|
||||||
return nil, buserr.New(constant.ErrEmailIsExist)
|
return nil, buserr.New(constant.ErrEmailIsExist)
|
||||||
}
|
}
|
||||||
|
|
||||||
if create.Type == "google" && (create.EabKid == "" || create.EabHmacKey == "") {
|
|
||||||
return nil, buserr.New(constant.ErrEabKidOrEabHmacKeyCannotBlank)
|
|
||||||
} else {
|
|
||||||
create.EabKid = ""
|
|
||||||
create.EabHmacKey = ""
|
|
||||||
}
|
|
||||||
|
|
||||||
acmeAccount := &model.WebsiteAcmeAccount{
|
acmeAccount := &model.WebsiteAcmeAccount{
|
||||||
Email: create.Email,
|
Email: create.Email,
|
||||||
Type: create.Type,
|
Type: create.Type,
|
||||||
KeyType: create.KeyType,
|
KeyType: create.KeyType,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if create.Type == "google" {
|
||||||
|
if create.EabKid == "" || create.EabHmacKey == "" {
|
||||||
|
return nil, buserr.New(constant.ErrEabKidOrEabHmacKeyCannotBlank)
|
||||||
|
}
|
||||||
|
acmeAccount.EabKid = create.EabKid
|
||||||
|
acmeAccount.EabHmacKey = create.EabHmacKey
|
||||||
|
}
|
||||||
|
|
||||||
client, err := ssl.NewAcmeClient(acmeAccount)
|
client, err := ssl.NewAcmeClient(acmeAccount)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
|
@ -165,7 +165,7 @@ export const DNSTypes = [
|
||||||
value: 'NameCom',
|
value: 'NameCom',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'Godaddy',
|
label: 'GoDaddy',
|
||||||
value: 'Godaddy',
|
value: 'Godaddy',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
|
@ -1872,6 +1872,7 @@ const message = {
|
||||||
buypassHelper: 'Buypass 大陸地區無法訪問',
|
buypassHelper: 'Buypass 大陸地區無法訪問',
|
||||||
googleHelper:
|
googleHelper:
|
||||||
"<a target=“_blank” href='https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn'>如何取得EAB HmacKey 和EAB kid</a > ",
|
"<a target=“_blank” href='https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn'>如何取得EAB HmacKey 和EAB kid</a > ",
|
||||||
|
googleCloudHelper: 'Google Cloud API is not accessible in most parts of mainland China',
|
||||||
},
|
},
|
||||||
firewall: {
|
firewall: {
|
||||||
create: 'Create rule',
|
create: 'Create rule',
|
||||||
|
|
|
@ -1756,6 +1756,7 @@ const message = {
|
||||||
buypassHelper: 'Buypass 大陸地區無法訪問',
|
buypassHelper: 'Buypass 大陸地區無法訪問',
|
||||||
googleHelper:
|
googleHelper:
|
||||||
"<a target=“_blank” href='https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn'>如何取得EAB HmacKey 和EAB kid</a > ",
|
"<a target=“_blank” href='https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn'>如何取得EAB HmacKey 和EAB kid</a > ",
|
||||||
|
googleCloudHelper: 'Google Cloud API 大陸大部分地區無法存取',
|
||||||
},
|
},
|
||||||
firewall: {
|
firewall: {
|
||||||
create: '創建規則',
|
create: '創建規則',
|
||||||
|
|
|
@ -1756,6 +1756,7 @@ const message = {
|
||||||
buypassHelper: 'Buypass 大陆地区无法访问',
|
buypassHelper: 'Buypass 大陆地区无法访问',
|
||||||
googleHelper:
|
googleHelper:
|
||||||
"<a target=“_blank” href='https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn'>如何获取 EAB HmacKey 和 EAB kid</a> ",
|
"<a target=“_blank” href='https://cloud.google.com/certificate-manager/docs/public-ca-tutorial?hl=zh-cn'>如何获取 EAB HmacKey 和 EAB kid</a> ",
|
||||||
|
googleCloudHelper: 'Google Cloud API 大陆大部分地区无法访问',
|
||||||
},
|
},
|
||||||
firewall: {
|
firewall: {
|
||||||
create: '创建规则',
|
create: '创建规则',
|
||||||
|
|
|
@ -34,6 +34,7 @@
|
||||||
:value="keyType.value"
|
:value="keyType.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<span class="input-help">{{ $t('ssl.googleCloudHelper') }}</span>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="account.type == 'google'">
|
<div v-if="account.type == 'google'">
|
||||||
<el-form-item label="EAB kid" prop="eabKid">
|
<el-form-item label="EAB kid" prop="eabKid">
|
||||||
|
|
Loading…
Reference in New Issue