Unify DOMAINS and HOSTNAMES into a single TARGETS config #10
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/dnswatcher#10
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently users must manually split their DNS names into two env vars:
DNSWATCHER_DOMAINSfor apex domainsDNSWATCHER_HOSTNAMESfor subdomainsThis is unnecessary since dnswatcher already needs the Public Suffix List to determine the parent domain for NS lookups. It should accept a single list and classify automatically:
DNSWATCHER_TARGETS=example.com,www.example.com,api.example.orggolang.org/x/net/publicsuffix) to determine: is this an apex domain (eTLD+1) or a hostname under one?This simplifies configuration and eliminates a source of user error (putting an apex in HOSTNAMES or vice versa).
Deprecate
DNSWATCHER_DOMAINSandDNSWATCHER_HOSTNAMESin favor ofDNSWATCHER_TARGETS. Keep the old vars working for backwards compat but log a deprecation warning.Also use
publicsuffix.EffectiveTLDPlusOne()in the resolver'sparentDomain()function instead of the current naive 2-label split (which breaks for.co.uk,.com.au, etc.).