From 03916a38b0af6ab5806fb99c07ff6980ee202831 Mon Sep 17 00:00:00 2001 From: Daniel Corbett Date: Thu, 14 Mar 2024 23:50:06 -0400 Subject: [PATCH] MINOR: api: add browser challenge to site rule The NGWAF now supports the `browserChallenge` action in site rules as part of the Bot Management product. This commit adds the `allowInteractive` capability to the Site Rule struct to allow for toggling interactive/non-interactive challenges. --- api.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/api.go b/api.go index 1ef203a..b43e32b 100644 --- a/api.go +++ b/api.go @@ -2129,10 +2129,11 @@ type Condition struct { // Action contains the rule action type Action struct { - Type string `json:"type,omitempty"` //(block, allow, exclude) - Signal string `json:"signal,omitempty"` - ResponseCode int `json:"responseCode,omitempty"` //(400-499) - RedirectURL string `json:"redirectURL,omitempty"` // requires ResponseCode 301 or 302 + Type string `json:"type,omitempty"` //(block, allow, exclude, browserChallenge) + Signal string `json:"signal,omitempty"` + ResponseCode int `json:"responseCode,omitempty"` //(400-499) + RedirectURL string `json:"redirectURL,omitempty"` // requires ResponseCode 301 or 302 + AllowInteractive bool `json:"allowInteractive,omitempty"` // used with browserChallenge } // ClientIdentifier contains the client identifier fields for site rules of type rate_limit