Skip to content

Commit

Permalink
allow txt if doesnt contain * in the middle
Browse files Browse the repository at this point in the history
  • Loading branch information
kokizzu committed Mar 14, 2024
1 parent 0e65208 commit b7301eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gcoreprovider/gcore.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func (p *DnsProvider) ApplyChanges(rootCtx context.Context, changes *plan.Change
for _, c := range changes.Create {
c := c
zone := extractZone(c.DNSName)
if zone == "" || c.RecordType == "TXT" {
if zone == "" {
continue
}
recordValues := make([]gdns.ResourceRecord, 0)
Expand Down Expand Up @@ -267,7 +267,8 @@ func (p *DnsProvider) AdjustEndpoints(endpoints []*endpoint.Endpoint) ([]*endpoi
adjusted := make([]*endpoint.Endpoint, 0, len(endpoints))
for _, e := range endpoints {
e := e
if e.RecordType != "TXT" {
if e.RecordType != "TXT" || // normal A/AAAA
strings.Index(e.DNSName, `*`) <= 0 { // as long as * not in the middle
adjusted = append(adjusted, e)
}
}
Expand Down

0 comments on commit b7301eb

Please sign in to comment.