mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-29 08:00:25 +08:00
集群可以设置默认的WAF策略、缓存策略
This commit is contained in:
21
internal/web/actions/default/servers/components/waf/count.go
Normal file
21
internal/web/actions/default/servers/components/waf/count.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package waf
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAdmin/internal/web/actions/actionutils"
|
||||
"github.com/TeaOSLab/EdgeCommon/pkg/rpc/pb"
|
||||
)
|
||||
|
||||
type CountAction struct {
|
||||
actionutils.ParentAction
|
||||
}
|
||||
|
||||
func (this *CountAction) RunPost(params struct{}) {
|
||||
countResp, err := this.RPC().HTTPFirewallPolicyRPC().CountAllEnabledHTTPFirewallPolicies(this.AdminContext(), &pb.CountAllEnabledHTTPFirewallPoliciesRequest{})
|
||||
if err != nil {
|
||||
this.ErrorPage(err)
|
||||
return
|
||||
}
|
||||
this.Data["count"] = countResp.Count
|
||||
|
||||
this.Success()
|
||||
}
|
||||
Reference in New Issue
Block a user