mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-10 09:45:17 +08:00
WAF策略中增加验证码相关定制设置
This commit is contained in:
@@ -2,6 +2,8 @@ package firewallconfigs
|
||||
|
||||
// HTTPFirewallBlockAction url client configure
|
||||
type HTTPFirewallBlockAction struct {
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"`
|
||||
|
||||
StatusCode int `yaml:"statusCode" json:"statusCode"`
|
||||
Body string `yaml:"body" json:"body"` // supports HTML
|
||||
URL string `yaml:"url" json:"url"`
|
||||
|
||||
@@ -1,19 +1,25 @@
|
||||
package firewallconfigs
|
||||
|
||||
type HTTPFirewallCaptchaAction struct {
|
||||
Life int32 `yaml:"life" json:"life"` // 有效期
|
||||
MaxFails int `yaml:"maxFails" json:"maxFails"` // 最大失败次数
|
||||
FailBlockTimeout int `yaml:"failBlockTimeout" json:"failBlockTimeout"` // 失败拦截时间
|
||||
IsPrior bool `yaml:"isPrior" json:"isPrior"`
|
||||
|
||||
UIIsOn bool `yaml:"uiIsOn" json:"uiIsOn"` // 是否使用自定义UI TODO
|
||||
UITitle string `yaml:"uiTitle" json:"uiTitle"` // 消息标题 TODO
|
||||
UIPrompt string `yaml:"uiPrompt" json:"uiPrompt"` // 消息提示 TODO
|
||||
UIButtonTitle string `yaml:"uiButtonTitle" json:"uiButtonTitle"` // 按钮标题 TODO
|
||||
UIShowRequestId bool `yaml:"uiShowRequestId" json:"uiShowRequestId"` // 是否显示请求ID TODO
|
||||
UICss string `yaml:"uiCss" json:"uiCss"` // CSS样式 TODO
|
||||
UIFooter string `yaml:"uiFooter" json:"uiFooter"` // TODO
|
||||
Life int32 `yaml:"life" json:"life"` // 有效期
|
||||
MaxFails int `yaml:"maxFails" json:"maxFails"` // 最大失败次数
|
||||
FailBlockTimeout int `yaml:"failBlockTimeout" json:"failBlockTimeout"` // 失败拦截时间
|
||||
FailBlockScopeAll bool `yaml:"failBlockScopeAll" json:"failBlockScopeAll"` // 是否全局有效
|
||||
|
||||
CountLetters int8 `yaml:"countLetters" json:"countLetters"` // 字符数量
|
||||
|
||||
UIIsOn bool `yaml:"uiIsOn" json:"uiIsOn"` // 是否使用自定义UI
|
||||
UITitle string `yaml:"uiTitle" json:"uiTitle"` // 消息标题
|
||||
UIPrompt string `yaml:"uiPrompt" json:"uiPrompt"` // 消息提示
|
||||
UIButtonTitle string `yaml:"uiButtonTitle" json:"uiButtonTitle"` // 按钮标题
|
||||
UIShowRequestId bool `yaml:"uiShowRequestId" json:"uiShowRequestId"` // 是否显示请求ID
|
||||
UICss string `yaml:"uiCss" json:"uiCss"` // CSS样式
|
||||
UIFooter string `yaml:"uiFooter" json:"uiFooter"` // 页脚
|
||||
UIBody string `yaml:"uiBody" json:"uiBody"` // 内容轮廓
|
||||
|
||||
CookieId string `yaml:"cookieId" json:"cookieId"` // TODO
|
||||
|
||||
Language string `yaml:"language" json:"language"` // 语言,zh-CN, en-US ... TODO 需要实现,目前是根据浏览器Accept-Language动态获取
|
||||
Lang string `yaml:"lang" json:"lang"` // 语言,zh-CN, en-US ... TODO 需要实现,目前是根据浏览器Accept-Language动态获取
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ type HTTPFirewallPolicy struct {
|
||||
Inbound *HTTPFirewallInboundConfig `yaml:"inbound" json:"inbound"`
|
||||
Outbound *HTTPFirewallOutboundConfig `yaml:"outbound" json:"outbound"`
|
||||
BlockOptions *HTTPFirewallBlockAction `yaml:"blockOptions" json:"blockOptions"`
|
||||
CaptchaOptions *HTTPFirewallCaptchaAction `yaml:"captchaOptions" json:"captchaOptions"`
|
||||
Mode FirewallMode `yaml:"mode" json:"mode"`
|
||||
UseLocalFirewall bool `yaml:"useLocalFirewall" json:"useLocalFirewall"`
|
||||
SYNFlood *SYNFloodConfig `yaml:"synFlood" json:"synFlood"`
|
||||
|
||||
Reference in New Issue
Block a user