/dns/getroot/{hostname} treats subdomains as a hostname /dns/getroot/{hostname} t...

Topic: /dns/getroot/{hostname} treats subdomains as a hostname

Post /dns/getroot/{hostname} treats subdomains as a hostname
by davlloyd on 05 January 2023

When using the API call /dns/getroot/{hostname} to identify the separation of the hostname from the DNS domain, the API treats the subdomain as part of the hostname. As an example if a hostname of 'myhost' in a subdomain of 'mysubdomain' is configured, the fqdn of 'myhost.mysubdomain.mydomain.com' will result in the api responding with

domainName: mydomain.com
node: myhost.subdomain

this also is an issue when using the /dns/record api for subdomain records. It fails to resolve them as it is looking for the records in the top level domain and not the sub domains.

The implication of this is the fact that subdomains can not be used in systems such as certificate generators that are geared towards using the API as the authoritative source of truth unless the subdomain is programmatically catered for away from the dynu api. I would love to see this resolved otherwise as the API support of sub domsiuns is very poor.Has anyone worked around this? I am gping to fork the cert-manager webhook for dynu to work around this but woudl like to see the api be more friendly.

Reply with quote | Report
26 December 2024 19:08
Loading...