feat: redirect based on PUBLIC_URL

This commit is contained in:
amhsirak
2024-12-03 21:55:02 +05:30
parent 6b664a00d1
commit 064318ea92

View File

@@ -384,7 +384,7 @@ router.get(
httpOnly: false,
maxAge: 60000,
});
res.redirect(`http://localhost:5173`);
res.redirect(process.env.PUBLIC_URL as string || "http://localhost:5173");
} catch (error: any) {
res.status(500).json({ message: `Google OAuth error: ${error.message}` });
}