mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-03 20:40:25 +08:00
WAF参数中增加“请求来源”
This commit is contained in:
@@ -24,4 +24,5 @@ type HTTPFirewallCheckpointDefinition struct {
|
||||
IsComposed bool `json:"isComposed"` // 是否为组合的checkpoint
|
||||
Priority int `json:"priority"` // 优先级
|
||||
DataType string `json:"dataType"` // 数据类型:number, bool等
|
||||
Version string `json:"version"` // 被加入的版本号
|
||||
}
|
||||
|
||||
@@ -168,7 +168,15 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
|
||||
DataType: "bool",
|
||||
},
|
||||
{
|
||||
Name: "请求来源URL",
|
||||
Name: "请求来源",
|
||||
Prefix: "refererOrigin",
|
||||
Description: "请求报头中的Referer和Origin值。",
|
||||
IsRequest: true,
|
||||
Priority: 100,
|
||||
Version: "1.3.2",
|
||||
},
|
||||
{
|
||||
Name: "请求来源Referer",
|
||||
Prefix: "referer",
|
||||
Description: "请求报头中的Referer值。",
|
||||
IsRequest: true,
|
||||
@@ -231,6 +239,7 @@ var AllCheckpoints = []*HTTPFirewallCheckpointDefinition{
|
||||
Description: "使用换行符(\\n)隔开的报头名称字符串,每行一个名称。",
|
||||
IsRequest: true,
|
||||
Priority: 100,
|
||||
Version: "1.3.2",
|
||||
},
|
||||
{
|
||||
Name: "单个请求报头值",
|
||||
|
||||
@@ -19,6 +19,9 @@ func TestRuleCheckpoint_Markdown(t *testing.T) {
|
||||
row += "* 名称:" + def.Name + "\n"
|
||||
row += "* 代号:`${" + def.Prefix + "}`\n"
|
||||
row += "* 描述:" + def.Description + "\n"
|
||||
if len(def.Version) > 0 {
|
||||
row += "* 版本:v" + def.Version + "\n"
|
||||
}
|
||||
result = append(result, row)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user