From f8086a098b8aa0cb12505257e531af3d90e6eb54 Mon Sep 17 00:00:00 2001 From: "G.Ambatte" Date: Wed, 13 Apr 2022 14:14:09 +1200 Subject: [PATCH] Add publicUrl to `default.json` --- config/default.json | 3 ++- server/app.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/config/default.json b/config/default.json index f74ce3b8e..eded5231d 100644 --- a/config/default.json +++ b/config/default.json @@ -3,5 +3,6 @@ "naturalcrit_url" : "local.naturalcrit.com:8010", "secret" : "secret", "web_port" : 8000, - "enable_v3" : true + "enable_v3" : true, + "publicUrl" : "https://homebrewery.naturalcrit.com" } diff --git a/server/app.js b/server/app.js index 4472bb360..4113e93be 100644 --- a/server/app.js +++ b/server/app.js @@ -264,7 +264,7 @@ const templateFn = require('./../client/template.js'); app.use((req, res)=>{ const props = { version : require('./../package.json').version, - publicUrl : config.get('publicUrl') ?? 'https://homebrewery.naturalcrit.com', + publicUrl : config.get('publicUrl'), url : req.originalUrl, brew : req.brew, brews : req.brews,