mirror of
https://github.com/Ylianst/MeshCentral.git
synced 2024-11-22 04:33:16 +03:00
Fix for web relay using ports.
This commit is contained in:
parent
e1a6091f94
commit
bcc2a8607e
@ -1654,7 +1654,7 @@ function CreateMeshCentralServer(config, args) {
|
||||
if (obj.common.validateStrArray(obj.args.relaydns, 1) == false) { delete obj.args.relaydns; }
|
||||
|
||||
// Start the HTTP relay web server if needed
|
||||
if ((obj.args.relaydns != null) && (typeof obj.args.relayport == 'number') && (obj.args.relayport != 0)) {
|
||||
if ((obj.args.relaydns == null) && (typeof obj.args.relayport == 'number') && (obj.args.relayport != 0)) {
|
||||
obj.webrelayserver = require('./webrelayserver.js').CreateWebRelayServer(obj, obj.db, obj.args, obj.certificates, function () { });
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ module.exports.CreateWebRelayServer = function (parent, db, args, certificates,
|
||||
// Setup a keygrip instance with higher default security, default hash is SHA1, we want to bump that up with SHA384
|
||||
// If multiple instances of this server are behind a load-balancer, this secret must be the same for all instances
|
||||
// If args.sessionkey is a string, use it as a single key, but args.sessionkey can also be used as an array of keys.
|
||||
const keygrip = require('keygrip')((typeof obj.args.sessionkey == 'string') ? [obj.args.sessionkey] : obj.args.sessionkey, 'sha384', 'base64');
|
||||
const keygrip = require('keygrip')((typeof args.sessionkey == 'string') ? [args.sessionkey] : args.sessionkey, 'sha384', 'base64');
|
||||
|
||||
// Setup cookie session
|
||||
const sessionOptions = {
|
||||
|
Loading…
Reference in New Issue
Block a user