mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-18 10:15:41 +00:00
fix: get TLD when ldhName is a TLD
This commit is contained in:
parent
e805c2292d
commit
6fc4456793
@ -20,7 +20,7 @@
|
|||||||
"publication": "1970-01-01T00:00:00Z",
|
"publication": "1970-01-01T00:00:00Z",
|
||||||
|
|
||||||
"services": [
|
"services": [
|
||||||
[ [ "" ], [ "https://rdap.iana.org/" ] ], # If you want to make RDAP queries to get TLD information from IANA
|
[ [ "." ], [ "https://rdap.iana.org/" ] ], # If you want to make RDAP queries to get TLD information from IANA
|
||||||
[ [ "ad" ], [ "https://rdap.nic.ad/" ] ],
|
[ [ "ad" ], [ "https://rdap.nic.ad/" ] ],
|
||||||
[ [ "ae" ], [ "https://rdap.nic.ae/" ] ],
|
[ [ "ae" ], [ "https://rdap.nic.ae/" ] ],
|
||||||
[ [ "ki" ], [ "https://rdap.nic.ki/" ] ],
|
[ [ "ki" ], [ "https://rdap.nic.ki/" ] ],
|
||||||
|
|||||||
@ -173,7 +173,7 @@ readonly class RDAPService
|
|||||||
private function getTld(string $domain): Tld
|
private function getTld(string $domain): Tld
|
||||||
{
|
{
|
||||||
if (!str_contains($domain, '.')) {
|
if (!str_contains($domain, '.')) {
|
||||||
$tldEntity = $this->tldRepository->findOneBy(['tld' => '']);
|
$tldEntity = $this->tldRepository->findOneBy(['tld' => '.']);
|
||||||
|
|
||||||
if (null == $tldEntity) {
|
if (null == $tldEntity) {
|
||||||
throw new NotFoundHttpException("The requested TLD $domain is not yet supported, please try again with another one");
|
throw new NotFoundHttpException("The requested TLD $domain is not yet supported, please try again with another one");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user