Removed the port splitting from the click action

This commit is contained in:
2023-01-01 04:20:28 +01:00
parent 543635e365
commit bd7dc4a2ca

View File

@ -6,7 +6,7 @@ const sendNotFound = (res) => res.status(404).render(process.cwd() + "/server/te
app.get("/", async (req, res) => { app.get("/", async (req, res) => {
res.locals.accessId = req.baseUrl.substring(1, req.baseUrl.length) || "home"; 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); const link = await getLinkByAccess(res.locals.accessId, currentDomain);
if (!link) return sendNotFound(res); if (!link) return sendNotFound(res);