mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-21 18:16:03 +02:00
Improved web whois interface
Added option for case-insensitive captchas
This commit is contained in:
parent
c4406b6070
commit
c5c3c76795
4 changed files with 37 additions and 6 deletions
|
@ -1800,6 +1800,22 @@ return [
|
|||
];
|
||||
```
|
||||
|
||||
### Web WHOIS/RDAP Client Configuration (`/var/www/whois/config.php`)
|
||||
|
||||
```php
|
||||
<?php
|
||||
|
||||
return [
|
||||
'whois_url' => 'whois.example.com',
|
||||
'rdap_url' => 'rdap.example.com',
|
||||
'ignore_captcha' => true,
|
||||
'registry_name' => 'Domain Registry LLC',
|
||||
'registry_url' => 'https://example.com',
|
||||
'branding' => false,
|
||||
'ignore_case_captcha' => false,
|
||||
];
|
||||
```
|
||||
|
||||
In conclusion, this detailed configuration guide aims to streamline the setup process of the Namingo system for users of all expertise levels. The guide meticulously details each configuration file, providing clear explanations and guidance for customization to suit your specific needs. This approach ensures that you can configure Namingo with confidence, optimizing it for your registry management requirements. We are committed to making the configuration process as straightforward as possible, and we welcome any questions or requests for further assistance. Your successful deployment and efficient management of Namingo is our top priority.
|
||||
|
||||
After finalizing the configuration of Namingo, the next step is to consult the [Initial Operation Guide](iog.md). This guide provides comprehensive details on configuring your registry, adding registrars, and much more, to ensure a smooth start with your system.
|
|
@ -7,9 +7,20 @@ if ($_SERVER['REQUEST_METHOD'] !== 'POST') {
|
|||
exit;
|
||||
}
|
||||
|
||||
if ($c['ignore_captcha'] === false && $_POST['captcha'] !== $_SESSION['captcha']) {
|
||||
if ($c['ignore_captcha'] === false) {
|
||||
$captchaInput = $_POST['captcha'];
|
||||
$captchaStored = $_SESSION['captcha'];
|
||||
|
||||
if (!empty($c['ignore_case_captcha'])) {
|
||||
$isValid = strcasecmp($captchaInput, $captchaStored) === 0;
|
||||
} else {
|
||||
$isValid = $captchaInput === $captchaStored;
|
||||
}
|
||||
|
||||
if (!$isValid) {
|
||||
echo json_encode(['error' => 'Captcha verification failed.']);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
$domain = $_POST['domain'];
|
||||
|
|
|
@ -7,4 +7,5 @@ return [
|
|||
'registry_name' => 'Domain Registry LLC',
|
||||
'registry_url' => 'https://example.com',
|
||||
'branding' => false,
|
||||
'ignore_case_captcha' => false,
|
||||
];
|
|
@ -237,12 +237,15 @@ $c['branding'] = isset($c['branding']) ? $c['branding'] : false;
|
|||
}
|
||||
|
||||
document.getElementById('domainInput').addEventListener('keypress', function(event) {
|
||||
// Check if the key pressed is 'Enter'
|
||||
if (event.key === 'Enter') {
|
||||
// Prevent the default action to avoid form submission or any other default behavior
|
||||
event.preventDefault();
|
||||
document.getElementById('whoisButton').click();
|
||||
}
|
||||
});
|
||||
|
||||
// Trigger the click event of the whoisButton
|
||||
document.getElementById('captchaInput').addEventListener('keypress', function(event) {
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
document.getElementById('whoisButton').click();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue