Unify DOMAINS and HOSTNAMES into a single TARGETS config #10
Atsaukties uz šo jaunā problēmā
Block a user
Dzēst atzaru "%!s()"
Atzara dzēšana ir neatgriezeniska. Kaut arī izdzēstais zars neilgu laiku var turpināt pastāvēt, pirms tas tiešām tiek noņemts, to vairumā gadījumu NEVAR atsaukt. Vai turpināt?
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.).