mirror of
https://github.com/getnamingo/registry.git
synced 2025-06-27 06:34:40 +02:00
Fixes for high load situations
This commit is contained in:
parent
9ce1196c2d
commit
94e0b9942b
2 changed files with 180 additions and 158 deletions
|
@ -39,4 +39,56 @@ function setupLogger($logFilePath, $channelName = 'app') {
|
|||
$log->pushHandler($fileHandler);
|
||||
|
||||
return $log;
|
||||
}
|
||||
|
||||
function mapContactToVCard($contactDetails, $role, $c) {
|
||||
return [
|
||||
'objectClassName' => 'entity',
|
||||
'handle' => ['C' . $contactDetails['identifier'] . '-' . $c['roid']],
|
||||
'roles' => [$role],
|
||||
'remarks' => [
|
||||
[
|
||||
"description" => [
|
||||
"This object's data has been partially omitted for privacy.",
|
||||
"Only the registrar managing the record can view personal contact data."
|
||||
],
|
||||
"links" => [
|
||||
[
|
||||
"href" => "https://namingo.org",
|
||||
"rel" => "alternate",
|
||||
"type" => "text/html"
|
||||
]
|
||||
],
|
||||
"title" => "REDACTED FOR PRIVACY",
|
||||
"type" => "Details are withheld due to privacy restrictions."
|
||||
],
|
||||
[
|
||||
"description" => [
|
||||
"To obtain contact information for the domain registrant, please refer to the Registrar of Record's RDDS service as indicated in this report."
|
||||
],
|
||||
"title" => "EMAIL REDACTED FOR PRIVACY",
|
||||
"type" => "Details are withheld due to privacy restrictions."
|
||||
],
|
||||
],
|
||||
'vcardArray' => [
|
||||
"vcard",
|
||||
[
|
||||
['version', new stdClass(), 'text', '4.0'],
|
||||
["fn", new stdClass(), 'text', $contactDetails['name']],
|
||||
["org", $contactDetails['org']],
|
||||
["adr", [
|
||||
"", // Post office box
|
||||
$contactDetails['street1'], // Extended address
|
||||
$contactDetails['street2'], // Street address
|
||||
$contactDetails['city'], // Locality
|
||||
$contactDetails['sp'], // Region
|
||||
$contactDetails['pc'], // Postal code
|
||||
$contactDetails['cc'] // Country name
|
||||
]],
|
||||
["tel", $contactDetails['voice'], ["type" => "voice"]],
|
||||
["tel", $contactDetails['fax'], ["type" => "fax"]],
|
||||
["email", $contactDetails['email']],
|
||||
]
|
||||
],
|
||||
];
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue