mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-01 23:31:50 +02:00
Added optional rate limiting for services
This commit is contained in:
parent
b0f63ffb25
commit
b3113da4f4
15 changed files with 110 additions and 13 deletions
|
@ -91,4 +91,11 @@ function mapContactToVCard($contactDetails, $role, $c) {
|
|||
]
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
function isIpWhitelisted($ip, $pdo) {
|
||||
$stmt = $pdo->prepare("SELECT COUNT(*) FROM registrar_whitelist WHERE addr = ?");
|
||||
$stmt->execute([$ip]);
|
||||
$count = $stmt->fetchColumn();
|
||||
return $count > 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue