mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2026-04-18 17:35:18 +08:00
WAF动作增加显示HTML内容
This commit is contained in:
@@ -8,6 +8,7 @@ const (
|
||||
FirewallActionTypeIPTables FirewallActionType = "iptables"
|
||||
FirewallActionTypeScript FirewallActionType = "script"
|
||||
FirewallActionTypeHTTPAPI FirewallActionType = "httpAPI"
|
||||
FirewallActionTypeHTML FirewallActionType = "html"
|
||||
)
|
||||
|
||||
type FirewallActionTypeDefinition struct {
|
||||
@@ -43,6 +44,11 @@ func FindAllFirewallActionTypes() []*FirewallActionTypeDefinition {
|
||||
Code: FirewallActionTypeHTTPAPI,
|
||||
Description: "使用自定义的HTTP API执行IP操作。",
|
||||
},
|
||||
{
|
||||
Name: "显示HTML内容",
|
||||
Code: FirewallActionTypeHTML,
|
||||
Description: "显示一段自定义的HTML网页内容",
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +92,7 @@ type FirewallActionScriptConfig struct {
|
||||
// TODO 添加需要阻止的端口列表
|
||||
}
|
||||
|
||||
// HTTP API配置
|
||||
type FirewallActionHTTPAPIConfig struct {
|
||||
URL string `json:"url"` // URL路径
|
||||
TimeoutSeconds int `json:"timeoutSeconds"` // 超时时间 TODO 暂时不实现
|
||||
@@ -93,3 +100,8 @@ type FirewallActionHTTPAPIConfig struct {
|
||||
|
||||
// TODO 添加需要阻止的端口列表
|
||||
}
|
||||
|
||||
// HTML配置
|
||||
type FirewallActionHTMLConfig struct {
|
||||
Content string `json:"content"` // 完整的HTML内容
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user