|
|
@ -14,6 +14,7 @@ const apiController = module.exports;
|
|
|
|
|
|
|
|
|
|
|
|
const relative_path = nconf.get('relative_path');
|
|
|
|
const relative_path = nconf.get('relative_path');
|
|
|
|
const upload_url = nconf.get('upload_url');
|
|
|
|
const upload_url = nconf.get('upload_url');
|
|
|
|
|
|
|
|
const asset_base_url = nconf.get('asset_base_url');
|
|
|
|
const socketioTransports = nconf.get('socket.io:transports') || ['polling', 'websocket'];
|
|
|
|
const socketioTransports = nconf.get('socket.io:transports') || ['polling', 'websocket'];
|
|
|
|
const socketioOrigins = nconf.get('socket.io:origins');
|
|
|
|
const socketioOrigins = nconf.get('socket.io:origins');
|
|
|
|
const websocketAddress = nconf.get('socket.io:address') || '';
|
|
|
|
const websocketAddress = nconf.get('socket.io:address') || '';
|
|
|
@ -22,7 +23,8 @@ apiController.loadConfig = async function (req) {
|
|
|
|
const config = {
|
|
|
|
const config = {
|
|
|
|
relative_path,
|
|
|
|
relative_path,
|
|
|
|
upload_url,
|
|
|
|
upload_url,
|
|
|
|
assetBaseUrl: `${relative_path}/assets`,
|
|
|
|
asset_base_url,
|
|
|
|
|
|
|
|
assetBaseUrl: asset_base_url, // deprecate in 1.20.x
|
|
|
|
siteTitle: validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB')),
|
|
|
|
siteTitle: validator.escape(String(meta.config.title || meta.config.browserTitle || 'NodeBB')),
|
|
|
|
browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB')),
|
|
|
|
browserTitle: validator.escape(String(meta.config.browserTitle || meta.config.title || 'NodeBB')),
|
|
|
|
titleLayout: (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'),
|
|
|
|
titleLayout: (meta.config.titleLayout || '{pageTitle} | {browserTitle}').replace(/{/g, '{').replace(/}/g, '}'),
|
|
|
|