Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions providers/bunnydns/auditrecords.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ import (
// supported, an empty list is returned.
func AuditRecords(records []*models.RecordConfig) []error {
a := rejectif.Auditor{}
a.Add("TXT", rejectif.TxtIsEmpty) // Last verified 2024-01-02
a.Add("SRV", rejectif.SrvHasNullTarget) // Last verified 2024-01-02
a.Add("TXT", rejectif.TxtIsEmpty) // Last verified 2024-01-02

return a.Audit(records)
}
9 changes: 7 additions & 2 deletions providers/bunnydns/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,16 @@ func fromRecordConfig(rc *models.RecordConfig) (*record, error) {
r.Value = strings.TrimSuffix(r.Value, ".")
}

// In the case of SVCB/HTTPS records, the Target is part of the Value.
// After removing trailing dots for said target, we can add the params to the value.
switch r.Type {
case recordTypeSVCB, recordTypeHTTPS:
// In the case of SVCB/HTTPS records, the Target is part of the Value.
// After removing trailing dots for said target, we can add the params to the value.
r.Value = fmt.Sprintf("%s %s", r.Value, rc.SvcParams)
case recordTypeSRV:
// SRV empty target is represented as "."
if r.Value == "" {
r.Value = "."
}
}

return &r, nil
Expand Down
Loading