Yes
This commit is contained in:
@@ -4,11 +4,16 @@ const nextConfig: NextConfig = {
|
||||
/* config options here */
|
||||
output: "standalone",
|
||||
async redirects() {
|
||||
if (!process.env.BACKEND_PORT) {
|
||||
throw new Error(
|
||||
"Environment variable BACKEND_PORT is not defined.",
|
||||
);
|
||||
}
|
||||
return [
|
||||
{
|
||||
destination: "/api",
|
||||
source: `http://localhost:${process.env.BACKEND_PORT}`,
|
||||
permanent: true,
|
||||
source: "/api",
|
||||
destination: `http://localhost:${process.env.BACKEND_PORT}`,
|
||||
permanent: false,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user