handle "server_name _"

This commit is contained in:
Charlie Root
2022-07-31 15:37:21 +00:00
parent 33b0f067f1
commit f1f91d9b3f

View File

@@ -21,7 +21,12 @@ function runVNC($jname)
} else {
$nodeip=$_SERVER['SERVER_ADDR'];
}
// handle when 'server_name _;' - use IP instead
if (strcmp($nodeip, "_") == 0) {
$nodeip=$_SERVER['SERVER_ADDR'];
}
# TODO: This will send the pass in clear text
header('Location: http://'.$nodeip.':6081/vnc_lite.html?scale=true&host='.$nodeip.'&port=6081?password='.$pass);
exit;