修复在未初始化缓存设置时添加缓存条件产生的panic错误

This commit is contained in:
刘祥超
2023-03-31 17:42:33 +08:00
parent 6596b47e54
commit 42c5b7a181

View File

@@ -41,6 +41,10 @@ func (this *UpdateRefsAction) RunPost(params struct {
// 校验配置
var cacheConfig = webConfig.Cache
if cacheConfig == nil {
this.Success()
return
}
var refs = []*serverconfigs.HTTPCacheRef{}
err = json.Unmarshal(params.RefsJSON, &refs)