Merge pull request #223 from getmaxun/allow-origins

feat: dynamic public url
This commit is contained in:
Karishma Shukla
2024-12-04 21:43:17 +05:30
committed by GitHub
7 changed files with 41 additions and 18 deletions

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}` });
}