The Linode API should be able to be queried for data about a wildcard subdomain by using the Domain Records List endpoint with the header x-filter: {"name": "*"} to filter the list of subdomains for the wildcard subdomain as part of the API call.
The API has a bug, though, specifically for the wildcard subdomain. The above query returns an empty list even when the wildcard subdomain exists. For GoDNS, this means a new wildcard subdomain is created every time the IP changes or the program is restarted because it can't find the existing wildcard subdomain.
This PR makes a small change: instead of asking for the API to filter the response, GoDNS instead asks for all subdomains and filters them itself.
I have an open ticket with Linode support about this. When Linode fixes the bug in the API we can revert this.
This is a temporary fix for #146.
The Linode API should be able to be queried for data about a wildcard subdomain by using the Domain Records List endpoint with the header
x-filter: {"name": "*"}
to filter the list of subdomains for the wildcard subdomain as part of the API call.The API has a bug, though, specifically for the wildcard subdomain. The above query returns an empty list even when the wildcard subdomain exists. For GoDNS, this means a new wildcard subdomain is created every time the IP changes or the program is restarted because it can't find the existing wildcard subdomain.
This PR makes a small change: instead of asking for the API to filter the response, GoDNS instead asks for all subdomains and filters them itself.
I have an open ticket with Linode support about this. When Linode fixes the bug in the API we can revert this.