Add netscan push endpoint: PVE1 nmap scan every 3min populates network devices

This commit is contained in:
2026-05-30 03:20:06 +00:00
parent 2faeb5498a
commit 62c7878615
3 changed files with 71 additions and 55 deletions
+4 -1
View File
@@ -26,7 +26,7 @@ $endpoint = $parts[0] ?? '';
$action = $parts[1] ?? '';
// Auth check (except login and ping)
if ($endpoint !== 'auth' && $endpoint !== 'agent') {
if ($endpoint !== 'auth' && $endpoint !== 'agent' && $endpoint !== 'netscan') {
$token = $_SESSION['jarvis_token'] ?? ($_SERVER['HTTP_X_SESSION_TOKEN'] ?? '');
if (empty($token) || $token !== ($_SESSION['jarvis_token'] ?? '')) {
$localIP = $_SERVER['REMOTE_ADDR'] ?? '';
@@ -57,6 +57,9 @@ switch ($endpoint) {
case 'system':
require __DIR__ . '/../api/endpoints/system.php';
break;
case 'netscan':
require __DIR__ . '/../api/endpoints/netscan.php';
break;
case 'network':
require __DIR__ . '/../api/endpoints/network.php';
break;