mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 09:07:00 +02:00
Fixed potential whois/rdap db issue and some cleanup
This commit is contained in:
parent
8966edf046
commit
76ec107f71
3 changed files with 30 additions and 29 deletions
|
@ -51,8 +51,6 @@ $http->set([
|
|||
'http_compression' => true
|
||||
]);
|
||||
|
||||
// Register a callback to handle incoming requests
|
||||
$http->on('request', function ($request, $response) {
|
||||
// Connect to the database
|
||||
try {
|
||||
$c = require_once 'config.php';
|
||||
|
@ -64,6 +62,9 @@ $http->on('request', function ($request, $response) {
|
|||
return;
|
||||
}
|
||||
|
||||
// Register a callback to handle incoming requests
|
||||
$http->on('request', function ($request, $response) use ($c, $pdo) {
|
||||
|
||||
// Extract the request path
|
||||
$requestPath = $request->server['request_uri'];
|
||||
|
||||
|
|
|
@ -25,13 +25,6 @@ $server->set([
|
|||
'package_eof' => "\r\n"
|
||||
]);
|
||||
|
||||
// Register a callback to handle incoming connections
|
||||
$server->on('connect', function ($server, $fd) {
|
||||
echo "Client connected: {$fd}\r\n";
|
||||
});
|
||||
|
||||
// Register a callback to handle incoming requests
|
||||
$server->on('receive', function ($server, $fd, $reactorId, $data) {
|
||||
// Connect to the database
|
||||
try {
|
||||
$c = require_once 'config.php';
|
||||
|
@ -42,6 +35,13 @@ $server->on('receive', function ($server, $fd, $reactorId, $data) {
|
|||
$server->close($fd);
|
||||
}
|
||||
|
||||
// Register a callback to handle incoming connections
|
||||
$server->on('connect', function ($server, $fd) {
|
||||
echo "Client connected: {$fd}\r\n";
|
||||
});
|
||||
|
||||
// Register a callback to handle incoming requests
|
||||
$server->on('receive', function ($server, $fd, $reactorId, $data) use ($c, $pdo) {
|
||||
$privacy = $c['privacy'];
|
||||
|
||||
// Validate and sanitize the data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue