Skip to content

Commit

Permalink
Add support for Read Timeout in Rulesets API
Browse files Browse the repository at this point in the history
  • Loading branch information
iveelsm committed Aug 25, 2023
1 parent 251e120 commit cb12b22
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .changelog/1374.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release_note:enhancement
rulesets: Add support for Proxy Read Timeout configuration via the Rulesets/Cache Rules API
```
1 change: 1 addition & 0 deletions rulesets.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions rulesets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit cb12b22

Please sign in to comment.