Skip to content

Node.js based forum software built for the modern web

fix process.env.url if it was changed

Barış Soner Uşaklı82b5246b2857
diff --git a/loader.js b/loader.js
index 21510018b7..eb29cdca74 100644
--- a/loader.js
+++ b/loader.js
@@ -168,6 +168,9 @@ Loader.restart = function () {
nconf.set('url', conf.url);
nconf.stores.env.readOnly = true;
+ if (process.env.url !== conf.url) {
+ process.env.url = conf.url;
+ }
Loader.start();
});
};
diff --git a/src/start.js b/src/start.js
index b9ab133b6d..0fbdcb4ae8 100644
--- a/src/start.js
+++ b/src/start.js
@@ -104,7 +104,7 @@ function setupConfigs() {
function printStartupInfo() {
if (nconf.get('isPrimary') === 'true') {
- winston.info('Initializing NodeBB v%s', nconf.get('version'));
+ winston.info('Initializing NodeBB v%s %s', nconf.get('version'), nconf.get('url'));
var host = nconf.get(nconf.get('database') + ':host');
var storeLocation = host ? 'at ' + host + (host.indexOf('/') === -1 ? ':' + nconf.get(nconf.get('database') + ':port') : '') : '';