mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-01-06 11:55:48 +08:00
WAF各个动作增加作用范围
This commit is contained in:
10
pkg/serverconfigs/firewallconfigs/firewall_scope.go
Normal file
10
pkg/serverconfigs/firewallconfigs/firewall_scope.go
Normal file
@@ -0,0 +1,10 @@
|
||||
// Copyright 2021 Liuxiangchao iwind.liu@gmail.com. All rights reserved.
|
||||
|
||||
package firewallconfigs
|
||||
|
||||
type FirewallScope = string
|
||||
|
||||
const (
|
||||
FirewallScopeGlobal FirewallScope = "global"
|
||||
FirewallScopeService FirewallScope = "service"
|
||||
)
|
||||
@@ -2,8 +2,9 @@ package firewallconfigs
|
||||
|
||||
// HTTPFirewallBlockAction url client configure
|
||||
type HTTPFirewallBlockAction struct {
|
||||
StatusCode int `yaml:"statusCode" json:"statusCode"`
|
||||
Body string `yaml:"body" json:"body"` // supports HTML
|
||||
URL string `yaml:"url" json:"url"`
|
||||
Timeout int32 `yaml:"timeout" json:"timeout"`
|
||||
StatusCode int `yaml:"statusCode" json:"statusCode"`
|
||||
Body string `yaml:"body" json:"body"` // supports HTML
|
||||
URL string `yaml:"url" json:"url"`
|
||||
Timeout int32 `yaml:"timeout" json:"timeout"`
|
||||
Scope FirewallScope `yaml:"scope" json:"scope"`
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
package firewallconfigs
|
||||
|
||||
type HTTPFirewallGet302Action struct {
|
||||
Life int32 `yaml:"life" json:"life"`
|
||||
Life int32 `yaml:"life" json:"life"`
|
||||
Scope FirewallScope `yaml:"scope" json:"scope"`
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
package firewallconfigs
|
||||
|
||||
type HTTPFirewallPost307Action struct {
|
||||
Life int32 `yaml:"life" json:"life"`
|
||||
Life int32 `yaml:"life" json:"life"`
|
||||
Scope FirewallScope `yaml:"scope" json:"scope"`
|
||||
}
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
package firewallconfigs
|
||||
|
||||
type HTTPFirewallRecordIPAction struct {
|
||||
Type string `yaml:"type" json:"type"`
|
||||
IPListId int64 `yaml:"ipListId" json:"ipListId"`
|
||||
Level string `yaml:"level" json:"level"`
|
||||
Timeout int32 `yaml:"timeout" json:"timeout"`
|
||||
Type string `yaml:"type" json:"type"`
|
||||
IPListId int64 `yaml:"ipListId" json:"ipListId"`
|
||||
Level string `yaml:"level" json:"level"`
|
||||
Timeout int32 `yaml:"timeout" json:"timeout"`
|
||||
Scope FirewallScope `yaml:"scope" json:"scope"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user