[WAF]规则中增加请求Header长度限制和响应Header长度限制

This commit is contained in:
GoEdgeLab
2020-11-18 19:36:08 +08:00
parent 05611f98f3
commit 4d57f6b3fe
3 changed files with 4 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
package teaconst
const (
Version = "0.0.1"
Version = "0.0.2"
ProductName = "Edge API"
ProcessName = "edge-api"

View File

@@ -6,6 +6,7 @@ type HTTPFirewallRule struct {
IsOn uint8 `field:"isOn"` // 是否启用
Description string `field:"description"` // 说明
Param string `field:"param"` // 参数
Filters string `field:"filters"` // 处理器
Operator string `field:"operator"` // 操作符
Value string `field:"value"` // 对比值
IsCaseInsensitive uint8 `field:"isCaseInsensitive"` // 是否大小写不敏感
@@ -21,6 +22,7 @@ type HTTPFirewallRuleOperator struct {
IsOn interface{} // 是否启用
Description interface{} // 说明
Param interface{} // 参数
Filters interface{} // 处理器
Operator interface{} // 操作符
Value interface{} // 对比值
IsCaseInsensitive interface{} // 是否大小写不敏感

View File

@@ -574,7 +574,7 @@ func (this *HTTPWebDAO) FindAllWebIdsWithHTTPFirewallPolicyId(firewallPolicyId i
ones, err := this.Query().
State(HTTPWebStateEnabled).
ResultPk().
Where(`JSON_CONTAINS(firewall, '{"firewallPolicyId": ` + strconv.FormatInt(firewallPolicyId, 10) + ` }')`).
Where(`JSON_CONTAINS(firewall, '{"isOn": true, "firewallPolicyId": ` + strconv.FormatInt(firewallPolicyId, 10) + ` }')`).
Reuse(false). // 由于我们在JSON_CONTAINS()直接使用了变量,所以不能重用
FindAll()
if err != nil {