mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-14 04:10:26 +08:00
优化代码/创建服务的时候可以保存SSL证书信息
This commit is contained in:
@@ -124,7 +124,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
SslPolicyId: sslPolicyId,
|
||||
Http2Enabled: sslPolicy.HTTP2Enabled,
|
||||
MinVersion: sslPolicy.MinVersion,
|
||||
CertsJSON: certsJSON,
|
||||
SslCertsJSON: certsJSON,
|
||||
HstsJSON: hstsJSON,
|
||||
ClientAuthType: types.Int32(sslPolicy.ClientAuthType),
|
||||
ClientCACertsJSON: clientCACertsJSON,
|
||||
@@ -139,7 +139,7 @@ func (this *IndexAction) RunPost(params struct {
|
||||
resp, err := this.RPC().SSLPolicyRPC().CreateSSLPolicy(this.AdminContext(), &pb.CreateSSLPolicyRequest{
|
||||
Http2Enabled: sslPolicy.HTTP2Enabled,
|
||||
MinVersion: sslPolicy.MinVersion,
|
||||
CertsJSON: certsJSON,
|
||||
SslCertsJSON: certsJSON,
|
||||
HstsJSON: hstsJSON,
|
||||
ClientAuthType: types.Int32(sslPolicy.ClientAuthType),
|
||||
ClientCACertsJSON: clientCACertsJSON,
|
||||
|
||||
@@ -150,13 +150,13 @@ func (this *RequestCertPopupAction) RunPost(params struct {
|
||||
if runResp.IsOk {
|
||||
certId := runResp.SslCertId
|
||||
|
||||
configResp, err := this.RPC().SSLCertRPC().FindEnabledSSLCertConfig(this.AdminContext(), &pb.FindEnabledSSLCertConfigRequest{CertId: certId})
|
||||
configResp, err := this.RPC().SSLCertRPC().FindEnabledSSLCertConfig(this.AdminContext(), &pb.FindEnabledSSLCertConfigRequest{SslCertId: certId})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
certConfig := &sslconfigs.SSLCertConfig{}
|
||||
err = json.Unmarshal(configResp.CertJSON, certConfig)
|
||||
err = json.Unmarshal(configResp.SslCertJSON, certConfig)
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user