修复证书更新后服务配置无法更新的问题

This commit is contained in:
刘祥超
2023-04-09 21:31:31 +08:00
parent 9dc9cdb28f
commit 1f7e60d062

View File

@@ -45,8 +45,8 @@ type SSLCertConfig struct {
// Init 校验
func (this *SSLCertConfig) Init(ctx context.Context) error {
// 从ctx中读取数据
if ctx != nil {
// 如果没有指定数据, 则从ctx中读取数据
if ctx != nil && len(this.CertData) == 0 {
var dataMapOne = ctx.Value("DataMap")
if dataMapOne != nil && !reflect.ValueOf(dataMapOne).IsNil() {
dataMap, ok := dataMapOne.(*shared.DataMap)