3 ms·
These change _very_ often. On one library I work on, we ended up writing a bot to fetch the list for us and open a pr in order to maintain it. I suspect anyone
by alganet 2y ago
These change _very_ often.
On one library I work on, we ended up writing a bot to fetch the list for us and open a pr in order to maintain it. I suspect anyone having to validate TLDs faces a similar problem.
- treesknees 2y agoI assume you’re using Mozilla’s public suffix list? https://publicsuffix.org/ https://publicsuffix.org/ We have something similar that keeps it updated on a regular basis as well. We used to wait until someone complained, but it changes so often it’s the only reasonable way to deal with it.
- alganet 2y agoWe use both, publicsuffix.org and data.iana.org/TLD/tlds-alpha-by-domain.txt https://github.com/Respect/Validation/blob/main/bin/update-domain-toplevel https://github.com/Respect/Validation/blob/main/bin/update-d... https://github.com/Respect/Validation/blob/main/bin/update-domain-suffixes https://github.com/Respect/Validation/blob/main/bin/update-d...