mirror of
https://github.com/getnamingo/registry.git
synced 2025-07-01 16:43:26 +02:00
Work on #63; hidden software version
This commit is contained in:
parent
a69a642a12
commit
5156802dc3
3 changed files with 23 additions and 4 deletions
|
@ -930,19 +930,29 @@ class SystemController extends Controller
|
||||||
return $response->withHeader('Location', '/registry/reserved')->withStatus(302);
|
return $response->withHeader('Location', '/registry/reserved')->withStatus(302);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$db = $this->container->get('db');
|
$db = $this->container->get('db');
|
||||||
$types = $db->select("SELECT DISTINCT type FROM reserved_domain_names");
|
$types = $db->select("SELECT DISTINCT type FROM reserved_domain_names");
|
||||||
// Get the current URI
|
// Get the current URI
|
||||||
$uri = $request->getUri()->getPath();
|
$uri = $request->getUri()->getPath();
|
||||||
|
|
||||||
|
// Set default types if $types is empty
|
||||||
|
if (empty($types)) {
|
||||||
|
$types = [
|
||||||
|
['type' => 'reserved'],
|
||||||
|
['type' => 'restricted']
|
||||||
|
];
|
||||||
|
}
|
||||||
|
|
||||||
$categories = [];
|
$categories = [];
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$typeNames = $db->select(
|
$typeNames = $db->select(
|
||||||
'SELECT name FROM reserved_domain_names WHERE type = ?',
|
'SELECT name FROM reserved_domain_names WHERE type = ?',
|
||||||
[ $type['type'] ]
|
[ $type['type'] ]
|
||||||
);
|
);
|
||||||
$categories[$type['type']] = array_column($typeNames, 'name');
|
|
||||||
|
// Initialize the type with an empty array if no names are found
|
||||||
|
$categories[$type['type']] = $typeNames ? array_column($typeNames, 'name') : [];
|
||||||
}
|
}
|
||||||
|
|
||||||
return view($response,'admin/system/manageReserved.twig', [
|
return view($response,'admin/system/manageReserved.twig', [
|
||||||
|
|
|
@ -190,6 +190,7 @@ rdap.example.com {
|
||||||
encode gzip
|
encode gzip
|
||||||
file_server
|
file_server
|
||||||
tls your-email@example.com
|
tls your-email@example.com
|
||||||
|
header -Server
|
||||||
header * {
|
header * {
|
||||||
Referrer-Policy "no-referrer"
|
Referrer-Policy "no-referrer"
|
||||||
Strict-Transport-Security max-age=31536000;
|
Strict-Transport-Security max-age=31536000;
|
||||||
|
@ -209,6 +210,7 @@ whois.example.com {
|
||||||
php_fastcgi unix//run/php/php8.2-fpm.sock
|
php_fastcgi unix//run/php/php8.2-fpm.sock
|
||||||
file_server
|
file_server
|
||||||
tls your-email@example.com
|
tls your-email@example.com
|
||||||
|
header -Server
|
||||||
header * {
|
header * {
|
||||||
Referrer-Policy "no-referrer"
|
Referrer-Policy "no-referrer"
|
||||||
Strict-Transport-Security max-age=31536000;
|
Strict-Transport-Security max-age=31536000;
|
||||||
|
@ -228,6 +230,7 @@ cp.example.com {
|
||||||
encode gzip
|
encode gzip
|
||||||
file_server
|
file_server
|
||||||
tls your-email@example.com
|
tls your-email@example.com
|
||||||
|
header -Server
|
||||||
log {
|
log {
|
||||||
output file /var/log/caddy/access.log
|
output file /var/log/caddy/access.log
|
||||||
format console
|
format console
|
||||||
|
|
|
@ -76,7 +76,10 @@ if [[ ("$OS" == "Ubuntu" && "$VER" == "22.04") || ("$OS" == "Debian GNU/Linux" &
|
||||||
edit_php_ini "$file" "session.cookie_domain" "example.com"
|
edit_php_ini "$file" "session.cookie_domain" "example.com"
|
||||||
edit_php_ini "$file" "memory_limit" "512M"
|
edit_php_ini "$file" "memory_limit" "512M"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
edit_php_ini "/etc/php/8.2/mods-available/opcache.ini" "opcache.jit" "1255"
|
||||||
|
edit_php_ini "/etc/php/8.2/mods-available/opcache.ini" "opcache.jit_buffer_size" "100M"
|
||||||
|
|
||||||
# Restart PHP-FPM service
|
# Restart PHP-FPM service
|
||||||
echo "Restarting PHP 8.2-FPM service..."
|
echo "Restarting PHP 8.2-FPM service..."
|
||||||
systemctl restart php8.2-fpm
|
systemctl restart php8.2-fpm
|
||||||
|
@ -171,6 +174,7 @@ if [[ ("$OS" == "Ubuntu" && "$VER" == "22.04") || ("$OS" == "Debian GNU/Linux" &
|
||||||
encode gzip
|
encode gzip
|
||||||
file_server
|
file_server
|
||||||
tls $YOUR_EMAIL
|
tls $YOUR_EMAIL
|
||||||
|
header -Server
|
||||||
header * {
|
header * {
|
||||||
Referrer-Policy "no-referrer"
|
Referrer-Policy "no-referrer"
|
||||||
Strict-Transport-Security max-age=31536000;
|
Strict-Transport-Security max-age=31536000;
|
||||||
|
@ -190,6 +194,7 @@ if [[ ("$OS" == "Ubuntu" && "$VER" == "22.04") || ("$OS" == "Debian GNU/Linux" &
|
||||||
php_fastcgi unix//run/php/php8.2-fpm.sock
|
php_fastcgi unix//run/php/php8.2-fpm.sock
|
||||||
file_server
|
file_server
|
||||||
tls $YOUR_EMAIL
|
tls $YOUR_EMAIL
|
||||||
|
header -Server
|
||||||
header * {
|
header * {
|
||||||
Referrer-Policy "no-referrer"
|
Referrer-Policy "no-referrer"
|
||||||
Strict-Transport-Security max-age=31536000;
|
Strict-Transport-Security max-age=31536000;
|
||||||
|
@ -209,6 +214,7 @@ if [[ ("$OS" == "Ubuntu" && "$VER" == "22.04") || ("$OS" == "Debian GNU/Linux" &
|
||||||
encode gzip
|
encode gzip
|
||||||
file_server
|
file_server
|
||||||
tls $YOUR_EMAIL
|
tls $YOUR_EMAIL
|
||||||
|
header -Server
|
||||||
log {
|
log {
|
||||||
output file /var/log/caddy/access.log
|
output file /var/log/caddy/access.log
|
||||||
format console
|
format console
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue