26 lines
771 B
TypeScript
26 lines
771 B
TypeScript
const apiOrigin =
|
|
process.env.API_INTERNAL_URL ?? process.env.NEXT_PUBLIC_API_URL ?? "http://localhost:3001/api";
|
|
|
|
const nextConfig = {
|
|
output: "standalone",
|
|
async rewrites() {
|
|
return [
|
|
{
|
|
source: "/api/:path*",
|
|
destination: `${apiOrigin}/:path*`,
|
|
},
|
|
];
|
|
},
|
|
async redirects() {
|
|
return [
|
|
{ source: "/login", destination: "/cliente-1/login", permanent: false },
|
|
{ source: "/app", destination: "/cliente-1", permanent: false },
|
|
{ source: "/app/:path*", destination: "/cliente-1/:path*", permanent: false },
|
|
{ source: "/platform", destination: "/admin", permanent: false },
|
|
{ source: "/platform/:path*", destination: "/admin/:path*", permanent: false },
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|