mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-12 19:06:13 +00:00
* Add LEMMY_UI_CUSTOM_SCRIPT env var. Fixes #655 * Change name to LEMMY_UI_CUSTOM_HTML * Change name to LEMMY_UI_CUSTOM_HTML_HEADER
This commit is contained in:
parent
0fc7808f3a
commit
c8869174e8
|
@ -36,6 +36,8 @@ if (process.env.NODE_ENV !== "development") {
|
||||||
next();
|
next();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
const customHtmlHeader = process.env["LEMMY_UI_CUSTOM_HTML_HEADER"] || "";
|
||||||
|
|
||||||
server.use(express.json());
|
server.use(express.json());
|
||||||
server.use(express.urlencoded({ extended: false }));
|
server.use(express.urlencoded({ extended: false }));
|
||||||
server.use("/static", express.static(path.resolve("./dist")));
|
server.use("/static", express.static(path.resolve("./dist")));
|
||||||
|
@ -198,6 +200,9 @@ server.get("/*", async (req, res) => {
|
||||||
<!-- A remote debugging utility for mobile -->
|
<!-- A remote debugging utility for mobile -->
|
||||||
${erudaStr}
|
${erudaStr}
|
||||||
|
|
||||||
|
<!-- Custom injected script -->
|
||||||
|
${customHtmlHeader}
|
||||||
|
|
||||||
${helmet.title.toString()}
|
${helmet.title.toString()}
|
||||||
${helmet.meta.toString()}
|
${helmet.meta.toString()}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue