Skip to content

Commit

Permalink
Support ServeError action and http_custom_errors phase
Browse files Browse the repository at this point in the history
  • Loading branch information
kroosec committed Jul 19, 2022
1 parent 18d9525 commit c82958b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rulesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (

RulesetPhaseDDoSL4 RulesetPhase = "ddos_l4"
RulesetPhaseDDoSL7 RulesetPhase = "ddos_l7"
RulesetPhaseHTTPCustomErrors RulesetPhase = "http_custom_errors"
RulesetPhaseHTTPLogCustomFields RulesetPhase = "http_log_custom_fields"
RulesetPhaseHTTPRequestCacheSettings RulesetPhase = "http_request_cache_settings"
RulesetPhaseHTTPRequestFirewallCustom RulesetPhase = "http_request_firewall_custom"
Expand Down Expand Up @@ -52,6 +53,7 @@ const (
RulesetRuleActionRoute RulesetRuleAction = "route"
RulesetRuleActionScore RulesetRuleAction = "score"
RulesetRuleActionSetCacheSettings RulesetRuleAction = "set_cache_settings"
RulesetRuleActionServeError RulesetRuleAction = "serve_error"
RulesetRuleActionSkip RulesetRuleAction = "skip"

RulesetActionParameterProductBIC RulesetActionParameterProduct = "bic"
Expand Down Expand Up @@ -84,6 +86,7 @@ func RulesetPhaseValues() []string {
return []string{
string(RulesetPhaseDDoSL4),
string(RulesetPhaseDDoSL7),
string(RulesetPhaseHTTPCustomErrors),
string(RulesetPhaseHTTPLogCustomFields),
string(RulesetPhaseHTTPRequestCacheSettings),
string(RulesetPhaseHTTPRequestFirewallCustom),
Expand Down Expand Up @@ -123,6 +126,7 @@ func RulesetRuleActionValues() []string {
string(RulesetRuleActionRoute),
string(RulesetRuleActionScore),
string(RulesetRuleActionSetCacheSettings),
string(RulesetRuleActionServeError),
string(RulesetRuleActionSkip),
}
}
Expand Down Expand Up @@ -216,6 +220,9 @@ type RulesetRuleActionParameters struct {
EdgeTTL *RulesetRuleActionParametersEdgeTTL `json:"edge_ttl,omitempty"`
BrowserTTL *RulesetRuleActionParametersBrowserTTL `json:"browser_ttl,omitempty"`
ServeStale *RulesetRuleActionParametersServeStale `json:"serve_stale,omitempty"`
Content string `json:"content,omitempty"`
ContentType string `json:"content_type,omitempty"`
StatusCode uint16 `json:"status_code,omitempty"`
RespectStrongETags *bool `json:"respect_strong_etags,omitempty"`
CacheKey *RulesetRuleActionParametersCacheKey `json:"cache_key,omitempty"`
OriginErrorPagePassthru *bool `json:"origin_error_page_passthru,omitempty"`
Expand Down

0 comments on commit c82958b

Please sign in to comment.