fix: dont overwrite asset_base_url if its set

isekai-main
Barış Soner Uşaklı 3 years ago
parent e0b1c374e4
commit 0e12f82dd8

@ -95,7 +95,9 @@ function loadConfig(configFile) {
nconf.set('secure', urlObject.protocol === 'https:');
nconf.set('use_port', !!urlObject.port);
nconf.set('relative_path', relativePath);
nconf.set('asset_base_url', `${relativePath}/assets`);
if (!nconf.get('asset_base_url')) {
nconf.set('asset_base_url', `${relativePath}/assets`);
}
nconf.set('port', nconf.get('PORT') || nconf.get('port') || urlObject.port || (nconf.get('PORT_ENV_VAR') ? nconf.get(nconf.get('PORT_ENV_VAR')) : false) || 4567);
// cookies don't provide isolation by port: http://stackoverflow.com/a/16328399/122353

Loading…
Cancel
Save