Skip to content

Commit

Permalink
fix: tencent cloud failed to update cert
Browse files Browse the repository at this point in the history
  • Loading branch information
oott123 committed Mar 24, 2023
1 parent a007b09 commit 6ae344b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/deployer/tencentcloud.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,13 @@ func (d *TencentCloudDeployer) deployCert(cdnDomain *cdn.DetailDomain, cert stri
Switch: common.StringPtr("on"),
}
}
if cdnDomain.Https.CertInfo == nil {
cdnDomain.Https.CertInfo = &cdn.ServerCert{}
}

cdnDomain.Https.Switch = common.StringPtr("on")

cdnDomain.Https.CertInfo = &cdn.ServerCert{}
cdnDomain.Https.CertInfo.Certificate = common.StringPtr(cert)
cdnDomain.Https.CertInfo.PrivateKey = common.StringPtr(key)
cdnDomain.Https.CertInfo.Message = common.StringPtr("certdeploy")

request := cdn.NewUpdateDomainConfigRequest()
request.Domain = cdnDomain.Domain
Expand Down

0 comments on commit 6ae344b

Please sign in to comment.