Skip to content

Commit

Permalink
Merge pull request #1971 from SimonFair/remove-viewer-fix-for-non-sta…
Browse files Browse the repository at this point in the history
…ndard-gui-ports

Non standard Webgui ports virt viewer fix.
  • Loading branch information
limetech authored Jan 6, 2025
2 parents 0f2f644 + 8b94c03 commit d778c56
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions emhttp/plugins/dynamix.vm.manager/include/VMajax.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ function embed(&$bootcfg, $env, $key, $value) {
$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") ;
Expand Down Expand Up @@ -183,7 +185,9 @@ function embed(&$bootcfg, $env, $key, $value) {
$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") ;
Expand Down

0 comments on commit d778c56

Please sign in to comment.