mirror of
https://github.com/unraid/webgui.git
synced 2026-05-06 20:30:50 -05:00
Merge pull request #1971 from SimonFair/remove-viewer-fix-for-non-standard-gui-ports
Non standard Webgui ports virt viewer fix.
This commit is contained in:
@@ -150,7 +150,9 @@ case 'domain-start-consoleRV':
|
||||
$vvarray = array() ;
|
||||
$vvarray[] = "[virt-viewer]\n";
|
||||
$vvarray[] = "type=$protocol\n";
|
||||
$vvarray[] = "host="._var($_SERVER,'HTTP_HOST')."\n" ;
|
||||
$vvarrayhost = _var($_SERVER,'HTTP_HOST');
|
||||
if (strpos($vvarrayhost,":")) $vvarrayhost = parse_url($vvarrayhost,PHP_URL_HOST);
|
||||
$vvarray[] = "host=$vvarrayhost\n" ;
|
||||
$vvarray[] = "port=$port\n" ;
|
||||
$vvarray[] = "delete-this-file=1\n" ;
|
||||
if (!is_dir("/mnt/user/system/remoteviewer")) mkdir("/mnt/user/system/remoteviewer") ;
|
||||
@@ -183,7 +185,9 @@ case 'domain-consoleRV':
|
||||
$vvarray = array() ;
|
||||
$vvarray[] = "[virt-viewer]\n";
|
||||
$vvarray[] = "type=$protocol\n";
|
||||
$vvarray[] = "host="._var($_SERVER,'HTTP_HOST')."\n" ;
|
||||
$vvarrayhost = _var($_SERVER,'HTTP_HOST');
|
||||
if (strpos($vvarrayhost,":")) $vvarrayhost = parse_url($vvarrayhost,PHP_URL_HOST);
|
||||
$vvarray[] = "host=$vvarrayhost\n" ;
|
||||
$vvarray[] = "port=$port\n" ;
|
||||
$vvarray[] = "delete-this-file=1\n" ;
|
||||
if (!is_dir("/mnt/user/system/remoteviewer")) mkdir("/mnt/user/system/remoteviewer") ;
|
||||
|
||||
Reference in New Issue
Block a user