WAF各个动作增加作用范围

This commit is contained in:
刘祥超
2021-10-19 10:28:18 +08:00
parent c708d83af0
commit 286174202e
5 changed files with 24 additions and 10 deletions

View 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"
)

View File

@@ -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"`
}

View File

@@ -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"`
}

View File

@@ -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"`
}

View File

@@ -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"`
}