From bd7dc4a2ca976a518d146cd92df90f8fa4c7eee2 Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Sun, 1 Jan 2023 04:20:28 +0100 Subject: [PATCH] Removed the port splitting from the click action --- server/actions/click.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/actions/click.js b/server/actions/click.js index 58273c1..e34a2c5 100644 --- a/server/actions/click.js +++ b/server/actions/click.js @@ -6,7 +6,7 @@ const sendNotFound = (res) => res.status(404).render(process.cwd() + "/server/te app.get("/", async (req, res) => { res.locals.accessId = req.baseUrl.substring(1, req.baseUrl.length) || "home"; - const currentDomain = req.get('host')?.split(":")[0] || "localhost"; + const currentDomain = req.get('host') || "localhost"; const link = await getLinkByAccess(res.locals.accessId, currentDomain); if (!link) return sendNotFound(res);