diff --git a/bbb-webhooks/config.js b/bbb-webhooks/config.js index e97a25bca48a50622642d33282e34ca43260dc03..0e829884c8970d1b2e31a5bfad598a6741d97328 100644 --- a/bbb-webhooks/config.js +++ b/bbb-webhooks/config.js @@ -4,26 +4,29 @@ const config = require("./config_local.js"); // BigBlueButton configs -if (!config.bbb) { config.bbb = {}; } +if (config.bbb == null) { config.bbb = {}; } if (!config.bbb.sharedSecret) { config.bbb.sharedSecret = "sharedSecret"; } if (!config.bbb.apiPath) { config.bbb.apiPath = "/bigbluebutton/api"; } +if (config.bbb.auth2_0 == null) { config.bbb.auth2_0 = true; } // Web server configs if (!config.server) { config.server = {}; } -if (!config.server.port) { config.server.port = 3005; } +if (config.server.port == null) { config.server.port = 3005; } // Web hooks configs if (!config.hooks) { config.hooks = {}; } if (!config.hooks.channels) { config.hooks.channels = { mainChannel: 'from-akka-apps-redis-channel', - rapChannel: 'bigbluebutton:from-rap' + rapChannel: 'bigbluebutton:from-rap', + chatChannel: 'from-akka-apps-chat-redis-channel' } } // IP where aggr will be hosted -if (!config.hooks.aggr) { config.hooks.aggr = []; } -if (!config.hooks.queueSize) { config.hooks.queueSize = 10000; } -if (!config.hooks.getRaw) { config.hooks.getRaw = false; } +if (!config.hooks.permanentURLs) { config.hooks.permanentURLs = []; } +if (config.hooks.queueSize == null) { config.hooks.queueSize = 10000; } +if (config.hooks.getRaw == null) { config.hooks.getRaw = false; } +if (config.hooks.multiEvent == null) { config.hooks.multiEvent = 10; } // Retry intervals for failed attempts for perform callback calls. // In ms. Totals to around 5min. @@ -31,6 +34,9 @@ config.hooks.retryIntervals = [ 100, 500, 1000, 2000, 4000, 8000, 10000, 30000, 60000, 60000, 60000, 60000 ]; +// Reset permanent interval when exceeding maximum attemps +config.hooks.permanentURLsIntervalReset = 8; + // Mappings of internal to external meeting IDs config.mappings = {}; config.mappings.cleanupInterval = 10000; // 10 secs, in ms diff --git a/bbb-webhooks/config_local.js.example b/bbb-webhooks/config_local.js.example index a67c7b309be7c55183891f97944f9453e125fa43..71c7e26c0bd852741464301b18de067fa56c3a12 100644 --- a/bbb-webhooks/config_local.js.example +++ b/bbb-webhooks/config_local.js.example @@ -5,23 +5,25 @@ const config = {}; // Shared secret of your BigBlueButton server. config.bbb = {}; config.bbb.sharedSecret = "mysharedsecret"; +// Whether to use Auth2.0 or not, Auth2.0 sends the sharedSecret whithin an Authorization header as a bearer +config.bbb.auth2_0 = true // The port in which the API server will run. config.server = {}; config.server.port = 3005; // Callbacks will be triggered for all the events in this list and only for these events. -config.hooks = {}; -config.hooks.channels = { - mainChannel: 'from-akka-apps-redis-channel', - rapChannel: 'bigbluebutton:from-rap', - chatChannel: 'from-akka-apps-chat-redis-channel' -} +//config.hooks = {}; +//config.hooks.channels = { +// mainChannel: 'from-akka-apps-redis-channel', +// rapChannel: 'bigbluebutton:from-rap', +// chatChannel: 'from-akka-apps-chat-redis-channel' +//} // IP where aggr will be hosted -config.hooks.aggr = ["request.catcher.url", "another.request.catcher.url"] +//config.hooks.permanentURLs = ["request.catcher.url", "another.request.catcher.url"] // Allow global hook to receive all events with raw data -config.hooks.getRaw = false; +//config.hooks.getRaw = false; module.exports = config;