集群可以设置默认的WAF策略、缓存策略

This commit is contained in:
刘祥超
2020-12-17 15:50:44 +08:00
parent 5c4d3c31f0
commit 65384082f7
100 changed files with 1172 additions and 488 deletions

View File

@@ -7,6 +7,7 @@ import (
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
"github.com/TeaOSLab/EdgeCommon/pkg/serverconfigs"
"github.com/iwind/TeaGo/actions"
"github.com/iwind/TeaGo/maps"
)
type CreatePopupAction struct {
@@ -79,8 +80,14 @@ func (this *CreatePopupAction) RunPost(params struct {
return
}
// 返回数据
this.Data["cachePolicy"] = maps.Map{
"id": createResp.HttpCachePolicyId,
"name": params.Name,
}
// 创建日志
defer this.CreateLog(oplogs.LevelInfo, "创建缓存策略:%d", createResp.CachePolicyId)
defer this.CreateLog(oplogs.LevelInfo, "创建缓存策略:%d", createResp.HttpCachePolicyId)
this.Success()
}