From 72f23e03b5f7ebc5bf44b76a5d95bad8d9606f4b Mon Sep 17 00:00:00 2001 From: thegobot Date: Wed, 12 Jan 2022 09:23:55 +0800 Subject: [PATCH] ports from ENV --- source/agent/webrtc/configLoader.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/agent/webrtc/configLoader.js b/source/agent/webrtc/configLoader.js index 1a8ea3972..9935737c7 100644 --- a/source/agent/webrtc/configLoader.js +++ b/source/agent/webrtc/configLoader.js @@ -51,8 +51,8 @@ module.exports.load = () => { config.webrtc = config.webrtc || {}; config.webrtc.stunserver = config.webrtc.stunserver || ''; config.webrtc.stunport = config.webrtc.stunport || 0; - config.webrtc.minport = config.webrtc.minport || 0; - config.webrtc.maxport = config.webrtc.maxport || 0; + config.webrtc.minport = config.webrtc.minport.indexOf('$') === 0 ? process.env[config.webrtc.minport.substr(1)] : (config.webrtc.minport || 0); + config.webrtc.maxport = config.webrtc.maxport.indexOf('$') === 0 ? process.env[config.webrtc.maxport.substr(1)] : (config.webrtc.maxport || 0); config.webrtc.keystorePath = config.webrtc.keystorePath || ''; config.webrtc.num_workers = config.webrtc.num_workers || 24; config.webrtc.use_nicer = config.webrtc.use_nicer || false;