Skip to content

Commit

Permalink
Fix regex domain filter
Browse files Browse the repository at this point in the history
  • Loading branch information
matusf committed Aug 5, 2023
1 parent 4b771e9 commit 68e0451
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion provider/pdns/pdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ func (c *PDNSAPIClient) ListZones() (zones []pgo.Zone, resp *http.Response, err
func (c *PDNSAPIClient) PartitionZones(zones []pgo.Zone) (filteredZones []pgo.Zone, residualZones []pgo.Zone) {
if c.domainFilter.IsConfigured() {
for _, zone := range zones {
if c.domainFilter.Match(zone.Name) || c.domainFilter.MatchParent(zone.Name) {
isMatch := c.domainFilter.Match(zone.Name)
if isMatch || (!c.domainFilter.IsRegexFilterConfigured() && c.domainFilter.MatchParent(zone.Name)) {
filteredZones = append(filteredZones, zone)
} else {
residualZones = append(residualZones, zone)
Expand Down

0 comments on commit 68e0451

Please sign in to comment.