From 9207d33c3449ef89fdc41a904baf5b5c6e289b84 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 22 May 2022 17:47:45 -0400 Subject: [PATCH] Add LEMMY_UI_CUSTOM_SCRIPT env var. Fixes #655 --- src/server/index.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/index.tsx b/src/server/index.tsx index 41a6ec8e..3d1ee803 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -36,6 +36,8 @@ if (process.env.NODE_ENV !== "development") { next(); }); } +const customScript = process.env["LEMMY_UI_CUSTOM_SCRIPT"] || ""; + server.use(express.json()); server.use(express.urlencoded({ extended: false })); server.use("/static", express.static(path.resolve("./dist"))); @@ -198,6 +200,9 @@ server.get("/*", async (req, res) => { ${erudaStr} + + ${customScript} + ${helmet.title.toString()} ${helmet.meta.toString()}