From b7301ebdb25034fd93822f0f7708f680aeaee9fa Mon Sep 17 00:00:00 2001 From: Kiswono Prayogo Date: Thu, 14 Mar 2024 20:12:07 +0700 Subject: [PATCH] allow txt if doesnt contain * in the middle --- gcoreprovider/gcore.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gcoreprovider/gcore.go b/gcoreprovider/gcore.go index 5182755..be893f4 100644 --- a/gcoreprovider/gcore.go +++ b/gcoreprovider/gcore.go @@ -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) @@ -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) } }