Skip to content

Commit

Permalink
feat: addded new rule level settings ignore_cname_category_matches to…
Browse files Browse the repository at this point in the history
… zt rules + added zt list item description
  • Loading branch information
Rex Scaria committed Jun 19, 2024
1 parent 95db331 commit d09e5b1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .changelog/2621.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
```release-note:enhancement
teams: Added ZT rule settings ignore_cname_category_matches
teams: Added description to ZT list item
```
5 changes: 3 additions & 2 deletions teams_list.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ type TeamsList struct {

// TeamsListItem represents a single list item.
type TeamsListItem struct {
Value string `json:"value"`
CreatedAt *time.Time `json:"created_at,omitempty"`
Value string `json:"value"`
Description string `json:"description,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
}

// PatchTeamsList represents a patch request for appending/removing list items.
Expand Down
3 changes: 3 additions & 0 deletions teams_rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ type TeamsRuleSettings struct {
// Turns on ip category based filter on dns if the rule contains dns category checks
IPCategories bool `json:"ip_categories"`

// Turns on for explicitly ignoring cname domain category matches
IgnoreCnameCategoryMatches `json:"ignore_cname_category_matches"`

// Allow parent MSP accounts to enable bypass their children's rules. Do not set them for non MSP accounts.
AllowChildBypass *bool `json:"allow_child_bypass,omitempty"`

Expand Down
1 change: 1 addition & 0 deletions teams_rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func TestTeamsRules(t *testing.T) {
"untrusted_cert": {
"action": "error"
},
"ignore_cname_category_matches": true,
"dns_resolvers": {
"ipv4": [
{"ip": "10.0.0.2", "port": 5053},
Expand Down

0 comments on commit d09e5b1

Please sign in to comment.