34 lines
784 B
TypeScript
34 lines
784 B
TypeScript
import type { NextConfig } from "next";
|
|
|
|
const dashboardUrl =
|
|
process.env.NEXT_PUBLIC_DASHBOARD_URL?.replace(/\/$/, "") ||
|
|
"http://localhost:3002";
|
|
|
|
const customerDashboardUrl =
|
|
process.env.NEXT_PUBLIC_CUSTOMER_DASHBOARD_URL?.replace(/\/$/, "") ||
|
|
"http://customer.localhost:3002";
|
|
|
|
const nextConfig: NextConfig = {
|
|
async redirects() {
|
|
return [
|
|
{
|
|
source: "/login",
|
|
destination: `${customerDashboardUrl}/login`,
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/signup",
|
|
destination: `${customerDashboardUrl}/login`,
|
|
permanent: false,
|
|
},
|
|
{
|
|
source: "/forgot-password",
|
|
destination: `${dashboardUrl}/forgot-password`,
|
|
permanent: false,
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|