diff --git a/rdap/config.php.dist b/rdap/config.php.dist index 8c1e2c7..16bb644 100644 --- a/rdap/config.php.dist +++ b/rdap/config.php.dist @@ -8,6 +8,7 @@ return [ 'db_username' => 'your_username', 'db_password' => 'your_password', 'roid' => 'XX', + 'minimum_data' => false, 'registry_url' => 'https://example.com/rdap-terms', 'rdap_url' => 'https://rdap.example.com', 'rately' => false, diff --git a/rdap/start_rdap.php b/rdap/start_rdap.php index a31b5ea..f0faf98 100644 --- a/rdap/start_rdap.php +++ b/rdap/start_rdap.php @@ -554,18 +554,20 @@ function handleDomainQuery($request, $response, $pdo, $domainName, $c, $log) { ], ], ], - [ - mapContactToVCard($registrantDetails, 'registrant', $c) - ], - array_map(function ($contact) use ($c) { - return mapContactToVCard($contact, 'admin', $c); - }, $adminDetails), - array_map(function ($contact) use ($c) { - return mapContactToVCard($contact, 'tech', $c); - }, $techDetails), - array_map(function ($contact) use ($c) { - return mapContactToVCard($contact, 'billing', $c); - }, $billingDetails) + !$c['minimum_data'] ? [ + [ + mapContactToVCard($registrantDetails, 'registrant', $c) + ], + array_map(function ($contact) use ($c) { + return mapContactToVCard($contact, 'admin', $c); + }, $adminDetails), + array_map(function ($contact) use ($c) { + return mapContactToVCard($contact, 'tech', $c); + }, $techDetails), + array_map(function ($contact) use ($c) { + return mapContactToVCard($contact, 'billing', $c); + }, $billingDetails) + ] : [] ), 'events' => $events, 'handle' => 'D' . $domainDetails['id'] . '-' . $c['roid'] . '',