WebP策略变化时只更新相关配置

This commit is contained in:
GoEdgeLab
2023-12-11 11:08:19 +08:00
parent 7f53748683
commit 9c9cee5537
5 changed files with 51 additions and 9 deletions

View File

@@ -1151,7 +1151,7 @@ func (this *NodeDAO) ComposeNodeConfig(tx *dbs.Tx, nodeId int64, dataMap *shared
// webp
if IsNotNull(nodeCluster.Webp) {
var webpPolicy = &nodeconfigs.WebPImagePolicy{}
var webpPolicy = nodeconfigs.NewWebPImagePolicy()
err = json.Unmarshal(nodeCluster.Webp, webpPolicy)
if err != nil {
return nil, err