bigbluebutton-Github/bbb-export-annotations/config/index.js
Daniel Schreiber b706069e20 Fix slides export for cluster setup
In cluster proxy setup as described in
https://docs.bigbluebutton.org/admin/clusterproxy.html you cannot assume that
the BBB Web API URL is at the same domain as the html5 client. Therefore
operators need to adjust the URL where presentation download is available.

This patch adds the ability to override the config provided by the package. This
is related to #14484
2022-10-22 11:19:39 +02:00

14 lines
433 B
JavaScript

let _ = require('lodash');
let fs = require('fs');
const settings = require('./settings');
const LOCAL_SETTINGS_FILE_PATH = '/etc/bigbluebutton/bbb-export-annotations.json';
const config = settings;
if (fs.existsSync(LOCAL_SETTINGS_FILE_PATH)) {
const local_config = JSON.parse(fs.readFileSync(LOCAL_SETTINGS_FILE_PATH));
_.mergeWith(config, local_config, (a, b) => (_.isArray(b) ? b : undefined));
}
module.exports = config;