diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx
index a77321e6f..a0a262038 100644
--- a/client/homebrew/pages/editPage/editPage.jsx
+++ b/client/homebrew/pages/editPage/editPage.jsx
@@ -352,7 +352,7 @@ const EditPage = createClass({
const title = `${this.props.brew.title} ${systems}`;
const text = `Hey guys! I've been working on this homebrew. I'd love your feedback. Check it out.
-**[Homebrewery Link](https://homebrewery.naturalcrit.com/share/${shareLink})**`;
+**[Homebrewery Link](${global.config.publicUrl}/share/${shareLink})**`;
return `https://www.reddit.com/r/UnearthedArcana/submit?title=${encodeURIComponent(title)}&text=${encodeURIComponent(text)}`;
},
@@ -387,7 +387,7 @@ const EditPage = createClass({
view
- {navigator.clipboard.writeText(`https://homebrewery.naturalcrit.com/share/${shareLink}`);}}>
+ {navigator.clipboard.writeText(`${global.config.publicUrl}/share/${shareLink}`);}}>
copy url
diff --git a/client/template.js b/client/template.js
index e3b144ae4..482e49c25 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,