Add LEMMY_UI_CUSTOM_SCRIPT env var. Fixes #655

This commit is contained in:
Dessalines 2022-05-22 17:47:45 -04:00 committed by Dessalines
parent 0fc7808f3a
commit 9207d33c34

View file

@ -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) => {
<!-- A remote debugging utility for mobile -->
${erudaStr}
<!-- Custom injected script -->
${customScript}
${helmet.title.toString()}
${helmet.meta.toString()}