diff --git a/dialects/homepage/dialect_homepage_handlers.js b/dialects/homepage/dialect_homepage_handlers.js index 051b769..5f12dbe 100644 --- a/dialects/homepage/dialect_homepage_handlers.js +++ b/dialects/homepage/dialect_homepage_handlers.js @@ -24,6 +24,9 @@ const homePageHandler = async (req, res) => { if (nconf.get('web:public_host')) { public_url = 'https://' + nconf.get('web:public_host') } + if (nconf.get('web:public_url')) { + public_url = nconf.get('web:public_url') + } // console.log('disk_config', disk_config); cache.getAnnotations('channel', 1, function(note, err) { if (err) console.error('error', err) diff --git a/dialects/nodepomf/dialect.loki_nodepomf.js b/dialects/nodepomf/dialect.loki_nodepomf.js index 145ec75..847439e 100644 --- a/dialects/nodepomf/dialect.loki_nodepomf.js +++ b/dialects/nodepomf/dialect.loki_nodepomf.js @@ -41,6 +41,10 @@ module.exports = (app, prefix) => { if (nconf.get('web:public_host')) { process.env.NPOMF_FILE_URL = 'https://' + nconf.get('web:public_host') + '/f'; } + if (nconf.get('web:public_url')) { + const url = nconf.get('web:public_url').replace(/\/$/, ''); // strip any trailing slash + process.env.NPOMF_FILE_URL = url + '/f'; + } if (diskConfig.storage && diskConfig.storage.download_url) { process.env.NPOMF_FILE_URL = diskConfig.storage.download_url + '/f' } diff --git a/docker-compose-backend.yml b/docker-compose-backend.yml index 01c4175..bb53cb4 100644 --- a/docker-compose-backend.yml +++ b/docker-compose-backend.yml @@ -34,7 +34,7 @@ services: web__listen: 0.0.0.0 # web__port: ${PORT?Variable PORT not set} web__port: 7070 - web__public_host: ${DOMAIN?Variable DOMAIN not set} + web__public_url: "https://${DOMAIN?Variable DOMAIN not set}" admin__listen: unified admin__modKey: enableAdmin database__default__type: mysql diff --git a/docker-compose.yml b/docker-compose.yml index 5fd1077..2297d0c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -64,7 +64,7 @@ services: environment: stream__host: redis web__listen: unified - web__public_host: ${DOMAIN?Variable DOMAIN not set} + web__public_url: "https://${DOMAIN?Variable DOMAIN not set}" admin__listen: unified admin__modKey: enableAdmin database__default__type: mysql