From f63302b978055571ad6898a61ce4d0cb3a4d8017 Mon Sep 17 00:00:00 2001 From: Sven Peter Date: Sun, 25 Jul 2021 17:51:27 +0200 Subject: [PATCH] INWX: fix apex domains (#1221) INWX has changed their API to use an empty string () instead of the common @. Fix that by converting between the two. --- providers/inwx/inwxProvider.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/providers/inwx/inwxProvider.go b/providers/inwx/inwxProvider.go index d007fd608..fc9924637 100644 --- a/providers/inwx/inwxProvider.go +++ b/providers/inwx/inwxProvider.go @@ -161,11 +161,16 @@ func newInwxDsp(m map[string]string, metadata json.RawMessage) (providers.DNSSer func makeNameserverRecordRequest(domain string, rec *models.RecordConfig) *goinwx.NameserverRecordRequest { content := rec.GetTargetField() + name := rec.GetLabel() + if name == "@" { + name = "" + } + req := &goinwx.NameserverRecordRequest{ Domain: domain, Type: rec.Type, Content: content, - Name: rec.GetLabel(), + Name: name, TTL: int(rec.TTL), } @@ -299,6 +304,9 @@ func (api *inwxAPI) GetZoneRecords(domain string) (models.Records, error) { var records = []*models.RecordConfig{} for _, record := range info.Records { + if record.Name == "" { + record.Name = "@" + } if record.Type == "SOA" { continue }