support custom fields for logging
@@ -170,6 +170,12 @@ type Ruleset struct {
ShareableEntitlementName string `json:"shareable_entitlement_name,omitempty"`
}
+// RulesetActionParametersLogCustomField wraps an object that is part of
+// request_fields, response_fields or cookie_fields.
+type RulesetActionParametersLogCustomField struct {
+ Name string `json:"name,omitempty"`
+}
+
// RulesetRuleActionParameters specifies the action parameters for a Ruleset
// rule.
type RulesetRuleActionParameters struct {
@@ -188,6 +194,9 @@ type RulesetRuleActionParameters struct {
Response *RulesetRuleActionParametersBlockResponse `json:"response,omitempty"`
HostHeader string `json:"host_header,omitempty"`
Origin *RulesetRuleActionParametersOrigin `json:"origin,omitempty"`
+ RequestFields []RulesetActionParametersLogCustomField `json:"request_fields,omitempty"`
+ ResponseFields []RulesetActionParametersLogCustomField `json:"response_fields,omitempty"`
+ CookieFields []RulesetActionParametersLogCustomField `json:"cookie_fields,omitempty"`
}
// RulesetRuleActionParametersBlockResponse holds the BlockResponse struct
