Added minimum data set support for RDAP

This commit is contained in:
Pinga 2024-07-24 11:20:33 +03:00
parent 35c6077de4
commit d91307da55
2 changed files with 15 additions and 12 deletions

View file

@ -8,6 +8,7 @@ return [
'db_username' => 'your_username', 'db_username' => 'your_username',
'db_password' => 'your_password', 'db_password' => 'your_password',
'roid' => 'XX', 'roid' => 'XX',
'minimum_data' => false,
'registry_url' => 'https://example.com/rdap-terms', 'registry_url' => 'https://example.com/rdap-terms',
'rdap_url' => 'https://rdap.example.com', 'rdap_url' => 'https://rdap.example.com',
'rately' => false, 'rately' => false,

View file

@ -554,18 +554,20 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) {
], ],
], ],
], ],
[ !$c['minimum_data'] ? [
mapContactToVCard($registrantDetails, 'registrant', $c) [
], mapContactToVCard($registrantDetails, 'registrant', $c)
array_map(function ($contact) use ($c) { ],
return mapContactToVCard($contact, 'admin', $c); array_map(function ($contact) use ($c) {
}, $adminDetails), return mapContactToVCard($contact, 'admin', $c);
array_map(function ($contact) use ($c) { }, $adminDetails),
return mapContactToVCard($contact, 'tech', $c); array_map(function ($contact) use ($c) {
}, $techDetails), return mapContactToVCard($contact, 'tech', $c);
array_map(function ($contact) use ($c) { }, $techDetails),
return mapContactToVCard($contact, 'billing', $c); array_map(function ($contact) use ($c) {
}, $billingDetails) return mapContactToVCard($contact, 'billing', $c);
}, $billingDetails)
] : []
), ),
'events' => $events, 'events' => $events,
'handle' => 'D' . $domainDetails['id'] . '-' . $c['roid'] . '', 'handle' => 'D' . $domainDetails['id'] . '-' . $c['roid'] . '',