From 35f0c559c09ebb2f4461905f73633eca9ec0fd78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Fri, 25 Feb 2022 18:42:45 -0500 Subject: [PATCH] fix: dont overwrite asset_base_url --- src/prestart.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/prestart.js b/src/prestart.js index 8f89336b9a..f2406e5ace 100644 --- a/src/prestart.js +++ b/src/prestart.js @@ -94,6 +94,9 @@ function loadConfig(configFile) { nconf.set('secure', urlObject.protocol === 'https:'); nconf.set('use_port', !!urlObject.port); nconf.set('relative_path', relativePath); + 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