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 {
|
||||
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{
|
||||
Email: create.Email,
|
||||
Type: create.Type,
|
||||
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)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -165,7 +165,7 @@ export const DNSTypes = [
|
|||
value: 'NameCom',
|
||||
},
|
||||
{
|
||||
label: 'Godaddy',
|
||||
label: 'GoDaddy',
|
||||
value: 'Godaddy',
|
||||
},
|
||||
];
|
||||
|
|
|
@ -1872,6 +1872,7 @@ const message = {
|
|||
buypassHelper: 'Buypass 大陸地區無法訪問',
|
||||
googleHelper:
|
||||
"<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: {
|
||||
create: 'Create rule',
|
||||
|
|
|
@ -1756,6 +1756,7 @@ const message = {
|
|||
buypassHelper: 'Buypass 大陸地區無法訪問',
|
||||
googleHelper:
|
||||
"<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: {
|
||||
create: '創建規則',
|
||||
|
|
|
@ -1756,6 +1756,7 @@ const message = {
|
|||
buypassHelper: 'Buypass 大陆地区无法访问',
|
||||
googleHelper:
|
||||
"<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: {
|
||||
create: '创建规则',
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
:value="keyType.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<span class="input-help">{{ $t('ssl.googleCloudHelper') }}</span>
|
||||
</el-form-item>
|
||||
<div v-if="account.type == 'google'">
|
||||
<el-form-item label="EAB kid" prop="eabKid">
|
||||
|
|
Loading…
Reference in New Issue