Skip to content

Normalize Domain Names (trailing .) #6

@piboistudios

Description

@piboistudios

Using dynamic_dns module in Go Caddy and got this error repeatedly:
unable to find Google managaged zone for domain what-the-heck-is-wrong-with-libdns.com

All my configurations were correct, I even ran the API call using an access token from the service account being used by Go Caddy and ran the domain listing call to be sure.

After scratching my head for about an hour, I finally realized the issue:
The API call returns dnsName as <domain>. (note the . at the end). In turn, this means I had to update my Caddy config to include . at the end of all domains.

It would be nice to have this normalized at the module level here, as I assume for other libdns providers, this is a non-issue (based on the config examples I've seen for dynamic_dns, none of them included a trailing ., hence the assumption)

This also seemingly breaks dynamic_dns now because it won't match subdomains to the domain with the . at the end.

I believe this PR would fix it (I have never written Go before, but its a 3 line change)
#7

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions