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,6 +554,7 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) {
], ],
], ],
], ],
!$c['minimum_data'] ? [
[ [
mapContactToVCard($registrantDetails, 'registrant', $c) mapContactToVCard($registrantDetails, 'registrant', $c)
], ],
@ -566,6 +567,7 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) {
array_map(function ($contact) use ($c) { array_map(function ($contact) use ($c) {
return mapContactToVCard($contact, 'billing', $c); return mapContactToVCard($contact, 'billing', $c);
}, $billingDetails) }, $billingDetails)
] : []
), ),
'events' => $events, 'events' => $events,
'handle' => 'D' . $domainDetails['id'] . '-' . $c['roid'] . '', 'handle' => 'D' . $domainDetails['id'] . '-' . $c['roid'] . '',