mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-09 07:25:46 +01:00
use_port only accepts string but saves as boolean, accept both now
previously, if you re-feed your config back in, it breaks
This commit is contained in:
@@ -179,7 +179,7 @@ function completeConfigSetup(err, config, next) {
|
|||||||
|
|
||||||
config.bcrypt_rounds = 12;
|
config.bcrypt_rounds = 12;
|
||||||
config.upload_path = '/public/uploads';
|
config.upload_path = '/public/uploads';
|
||||||
config.use_port = config.use_port.slice(0, 1) === 'y';
|
config.use_port = typeof config.use_port === 'boolean' ? config.use_port : config.use_port.slice(0, 1) === 'y';
|
||||||
|
|
||||||
var urlObject = url.parse(config.base_url),
|
var urlObject = url.parse(config.base_url),
|
||||||
relative_path = (urlObject.pathname && urlObject.pathname.length > 1) ? urlObject.pathname : '',
|
relative_path = (urlObject.pathname && urlObject.pathname.length > 1) ? urlObject.pathname : '',
|
||||||
|
|||||||
Reference in New Issue
Block a user