mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-12-31 23:56:36 +08:00
23 lines
666 B
Go
23 lines
666 B
Go
package firewallconfigs
|
|
|
|
import "net/http"
|
|
|
|
// 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"`
|
|
Timeout int32 `yaml:"timeout" json:"timeout"`
|
|
Scope FirewallScope `yaml:"scope" json:"scope"`
|
|
}
|
|
|
|
func DefaultHTTPFirewallBlockAction() *HTTPFirewallBlockAction {
|
|
return &HTTPFirewallBlockAction{
|
|
StatusCode: http.StatusForbidden,
|
|
Body: "Blocked By WAF",
|
|
Timeout: 300,
|
|
}
|
|
}
|