File tree 2 files changed +8
-3
lines changed
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ var PASSWORD = process.env.PASSWORD || 'abc';
6
6
var SUBFOLDER = process . env . SUBFOLDER || '/' ;
7
7
var TITLE = process . env . TITLE || 'KasmVNC Client' ;
8
8
var FM_HOME = process . env . FM_HOME || '/config' ;
9
-
9
+ var PATH ;
10
+ if ( SUBFOLDER != '/' ) {
11
+ PATH = '&path=' + SUBFOLDER + 'websockify'
12
+ } else {
13
+ PATH = false ;
14
+ }
10
15
//// Application Variables ////
11
16
var socketIO = require ( 'socket.io' ) ;
12
17
var express = require ( 'express' ) ;
@@ -33,7 +38,7 @@ app.engine('json', require('ejs').renderFile);
33
38
baseRouter . use ( '/public' , express . static ( __dirname + '/public' ) ) ;
34
39
baseRouter . use ( '/vnc' , express . static ( "/usr/share/kasmvnc/www/" ) ) ;
35
40
baseRouter . get ( '/' , function ( req , res ) {
36
- res . render ( __dirname + '/public/index.html' , { title : TITLE } ) ;
41
+ res . render ( __dirname + '/public/index.html' , { title : TITLE , path : PATH } ) ;
37
42
} ) ;
38
43
baseRouter . get ( '/favicon.ico' , function ( req , res ) {
39
44
res . sendFile ( __dirname + '/public/favicon.ico' ) ;
Original file line number Diff line number Diff line change 14
14
</ head >
15
15
< body >
16
16
<!--KasmVNC Iframe-->
17
- < iframe class ="vnc " src ="vnc/index.html?autoconnect=1&resize=remote&clipboard_up=true&clipboard_down=true&clipboard_seamless=true&show_control_bar=true "> </ iframe >
17
+ < iframe class ="vnc " src ="vnc/index.html?autoconnect=1&resize=remote&clipboard_up=true&clipboard_down=true&clipboard_seamless=true&show_control_bar=true<% if(path){ %><%- path -%><% } %> "> </ iframe >
18
18
<!--LSIO Function Bar-->
19
19
< div id ="lsbar ">
20
20
< img class ="icons " id ="fileButton " title ="File Manager " src ="public/css/files.svg " onclick ="toggle('#files') "/>
You can’t perform that action at this time.
0 commit comments