Prob not the best solution, but it works

Closes: https://github.com/pelican-dev/panel/issues/452
This commit is contained in:
Charles 2024-07-02 08:01:17 -04:00
parent c464b321dd
commit 40721a2cb8

View File

@ -233,7 +233,9 @@ class CreateServer extends CreateRecord
$end = min((int) $end, 2 ** 16 - 1);
$range = $start <= $end ? range($start, $end) : range($end, $start);
foreach ($range as $i) {
$ports->push($i);
if($i > 1024 && $i <= 65535) {
$ports->push($i);
}
}
}
@ -249,8 +251,6 @@ class CreateServer extends CreateRecord
$ports = $sortedPorts;
}
$ports = $ports->filter(fn ($port) => $port > 1024 && $port < 65535)->values();
if ($update) {
$set('allocation_ports', $ports->all());
}