diff --git a/package.json b/package.json
index 62c4ac79..73b0fbf3 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "meshcentral",
- "version": "0.4.1-v",
+ "version": "0.4.1-w",
"keywords": [
"Remote Management",
"Intel AMT",
diff --git a/views/default-min.handlebars b/views/default-min.handlebars
index 59fc8798..5f923d2a 100644
--- a/views/default-min.handlebars
+++ b/views/default-min.handlebars
@@ -1 +1 @@
-
{{{title}}} My Devices | My Account | My Events | My Files | My Users | My Server | |
General | Desktop | Terminal | Files | Events | Details | Intel® AMT | Console | |
Server disconnected, click to reconnect.
My Devices
| No device groups. |
My Account
Device Groups ( New ) My Events
| Show | |
My Files
These files are shared publicly, click "link" to get public url.
✓
✗
My Server
Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
| Show | |
General -
Events -
| Show | |
File Selection
Agent Remote Desktop
Scaling
Frame rate
Intel® AMT Hardware KVM
Image Encoding
\ No newline at end of file
+ {{{title}}} My Devices | My Account | My Events | My Files | My Users | My Server | |
General | Desktop | Terminal | Files | Events | Details | Intel® AMT | Console | |
Server disconnected, click to reconnect.
My Devices
| No device groups. |
My Account
Device Groups ( New ) My Events
| Show | |
My Files
These files are shared publicly, click "link" to get public url.
✓
✗
My Server
Server Statistics
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
Intel® AMT Redirection port or KVM feature is disabled, click here to enable it.
Remote computer is not powered on, click here to issue a power command.
| Show | |
General -
Events -
| Show | |
File Selection
Agent Remote Desktop
Scaling
Frame rate
Intel® AMT Hardware KVM
Image Encoding
\ No newline at end of file
diff --git a/views/default.handlebars b/views/default.handlebars
index 096cafee..7aa8e071 100644
--- a/views/default.handlebars
+++ b/views/default.handlebars
@@ -4856,9 +4856,9 @@
QV('DeskClip', (currentNode.agent) && (currentNode.agent.id != 11) && (currentNode.agent.id != 16) && ((desktop == null) || (desktop.contype != 2))); // Clipboard not supported on MacOS
QE('DeskClip', deskState == 3);
QE('DeskType', deskState == 3);
- QV('DeskWD', (currentNode.agent) && (currentNode.agent.id < 5) && inputAllowed);
+ QV('DeskWD', inputAllowed);
QE('DeskWD', deskState == 3);
- QV('deskkeys', (currentNode.agent) && (currentNode.agent.id < 5) && inputAllowed);
+ QV('deskkeys', inputAllowed);
QE('deskkeys', deskState == 3);
QV('DeskToolsButton', (inputAllowed) && (mesh.mtype == 2) && online);
diff --git a/webserver.js b/webserver.js
index 8de985a5..93634d15 100644
--- a/webserver.js
+++ b/webserver.js
@@ -447,7 +447,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// If a trusted reverse-proxy is sending us the remote IP address, use it.
// This is not done automatically for web socket like it's done for HTTP requests.
- if ((obj.args.tlsoffload) && (res.headers['x-forwarded-for']) && ((obj.args.tlsoffload === true) || (obj.args.tlsoffload === ip) || (('::ffff:') + obj.args.tlsoffload === ip))) { ip = res.headers['x-forwarded-for']; }
+ if ((obj.args.trustedproxy) && (res.headers['x-forwarded-for']) && ((obj.args.trustedproxy === true) || (obj.args.trustedproxy === ip) || (('::ffff:') + obj.args.trustedproxy === ip))) { ip = res.headers['x-forwarded-for']; }
+ else if ((obj.args.tlsoffload) && (res.headers['x-forwarded-for']) && ((obj.args.tlsoffload === true) || (obj.args.tlsoffload === ip) || (('::ffff:') + obj.args.tlsoffload === ip))) { ip = res.headers['x-forwarded-for']; }
if (ip) { for (var i = 0; i < ipList.length; i++) { if (require('ipcheck').match(ip, ipList[i])) { if (closeIfThis === true) { try { req.close(); } catch (e) { } } return true; } } }
if (closeIfThis === false) { try { req.close(); } catch (e) { } }
@@ -3191,7 +3192,8 @@ module.exports.CreateWebServer = function (parent, db, args, certificates) {
// Setup middleware
obj.app.engine('handlebars', obj.exphbs({ defaultLayout: null })); // defaultLayout: 'main'
obj.app.set('view engine', 'handlebars');
- if (obj.args.tlsoffload) { obj.app.set('trust proxy', obj.args.tlsoffload); } // Reverse proxy should add the "X-Forwarded-*" headers
+ if (obj.args.trustedproxy) { obj.app.set('trust proxy', obj.args.trustedproxy); } // Reverse proxy should add the "X-Forwarded-*" headers
+ else if (obj.args.tlsoffload) { obj.app.set('trust proxy', obj.args.tlsoffload); } // Reverse proxy should add the "X-Forwarded-*" headers
obj.app.use(obj.bodyParser.urlencoded({ extended: false }));
var sessionOptions = {
name: 'xid', // Recommended security practice to not use the default cookie name