From 1b937d5e412c260e6b68e453fbb1b6a7f1c869b9 Mon Sep 17 00:00:00 2001 From: Daniel Corbett <38925638+daniel-corbett@users.noreply.github.com> Date: Fri, 15 Mar 2024 02:01:24 -0400 Subject: [PATCH] MINOR: api: add browser challenge to site rule (#60) 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