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

This commit is contained in:
GoEdgeLab
2023-03-31 17:42:33 +08:00
parent 4d173f2df0
commit 0e6b36af4f

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)