mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
[WAF]规则中增加请求Header长度限制和响应Header长度限制
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package teaconst
|
||||
|
||||
const (
|
||||
Version = "0.0.1"
|
||||
Version = "0.0.2"
|
||||
|
||||
ProductName = "Edge API"
|
||||
ProcessName = "edge-api"
|
||||
|
||||
@@ -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{} // 是否大小写不敏感
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user