mirror of
https://github.com/linuxserver/kclient.git
synced 2026-03-23 00:00:56 +08:00
#6 add pat support to iframe to automate setting websockify endpoint
This commit is contained in:
parent
400db19ae1
commit
76a2776c83
9
index.js
9
index.js
@ -6,7 +6,12 @@ var PASSWORD = process.env.PASSWORD || 'abc';
|
||||
var SUBFOLDER = process.env.SUBFOLDER || '/';
|
||||
var TITLE = process.env.TITLE || 'KasmVNC Client';
|
||||
var FM_HOME = process.env.FM_HOME || '/config';
|
||||
|
||||
var PATH;
|
||||
if (SUBFOLDER != '/') {
|
||||
PATH = '&path=' + SUBFOLDER + 'websockify'
|
||||
} else {
|
||||
PATH = false;
|
||||
}
|
||||
//// Application Variables ////
|
||||
var socketIO = require('socket.io');
|
||||
var express = require('express');
|
||||
@ -33,7 +38,7 @@ app.engine('json', require('ejs').renderFile);
|
||||
baseRouter.use('/public', express.static(__dirname + '/public'));
|
||||
baseRouter.use('/vnc', express.static("/usr/share/kasmvnc/www/"));
|
||||
baseRouter.get('/', function (req, res) {
|
||||
res.render(__dirname + '/public/index.html', {title: TITLE});
|
||||
res.render(__dirname + '/public/index.html', {title: TITLE, path: PATH});
|
||||
});
|
||||
baseRouter.get('/favicon.ico', function (req, res) {
|
||||
res.sendFile(__dirname + '/public/favicon.ico');
|
||||
|
||||
@ -14,7 +14,7 @@
|
||||
</head>
|
||||
<body>
|
||||
<!--KasmVNC Iframe-->
|
||||
<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>
|
||||
<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>
|
||||
<!--LSIO Function Bar-->
|
||||
<div id="lsbar">
|
||||
<img class="icons" id="fileButton" title="File Manager" src="public/css/files.svg" onclick="toggle('#files')"/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user