From 6c4b8d9dabd1b8983dd9afae74d2a7c0ac450036 Mon Sep 17 00:00:00 2001 From: Mikey Sleevi Date: Fri, 25 Aug 2023 10:31:05 -0600 Subject: [PATCH] Add support for Read Timeout in Rulesets API --- rulesets.go | 1 + rulesets_test.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/rulesets.go b/rulesets.go index 206a5e17c1b..92cc252dabc 100644 --- a/rulesets.go +++ b/rulesets.go @@ -247,6 +247,7 @@ type RulesetRuleActionParameters struct { Mirage *bool `json:"mirage,omitempty"` OpportunisticEncryption *bool `json:"opportunistic_encryption,omitempty"` Polish *Polish `json:"polish,omitempty"` + ReadTimeout *uint `json:"read_timeout,omitempty"` RocketLoader *bool `json:"rocket_loader,omitempty"` SecurityLevel *SecurityLevel `json:"security_level,omitempty"` ServerSideExcludes *bool `json:"server_side_excludes,omitempty"` diff --git a/rulesets_test.go b/rulesets_test.go index d2d654a1f09..18cdd964830 100644 --- a/rulesets_test.go +++ b/rulesets_test.go @@ -241,6 +241,7 @@ func TestGetRuleset_SetCacheSettings(t *testing.T) { } } }, + "read_timeout": 1000, "origin_error_page_passthru":true }, "description": "Set all available cache settings in one rule", @@ -324,6 +325,7 @@ func TestGetRuleset_SetCacheSettings(t *testing.T) { }, }, }, + ReadTimeout: UintPtr(1000), OriginErrorPagePassthru: BoolPtr(true), }, Description: "Set all available cache settings in one rule",