From 0e25793f0ae0536440de00f0dcb87a0b8b68160c Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 13 Apr 2022 19:35:51 +1200 Subject: [PATCH] Add publicUrl to global.config & update template --- client/template.js | 2 +- server/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/template.js b/client/template.js index fd8bc22b6..b9f76fdde 100644 --- a/client/template.js +++ b/client/template.js @@ -1,5 +1,5 @@ module.exports = async(name, title = '', props = {})=>{ - const HOMEBREWERY_PUBLIC_URL=props.publicUrl; + const HOMEBREWERY_PUBLIC_URL=props.config.publicUrl; return ` diff --git a/server/app.js b/server/app.js index 381113a4a..adb741b32 100644 --- a/server/app.js +++ b/server/app.js @@ -281,11 +281,11 @@ app.use((req, res)=>{ // Create configuration object const configuration = { local : isLocalEnvironment, + publicUrl : config.get('publicUrl') ?? '', environment : nodeEnv }; const props = { version : require('./../package.json').version, - publicUrl : config.get('publicUrl') ?? '', url : req.originalUrl, brew : req.brew, brews : req.brews,