This commit is contained in:
quantulr
2023-11-07 17:14:42 +08:00
parent a8b1ad286d
commit 83e7cd3c4d
5 changed files with 35 additions and 21 deletions

View File

@ -1,16 +1,19 @@
/** @type {import("next").NextConfig} */
const nextConfig = {
async rewrites() {
return [
{
source: "/api/:path*",
destination: "http://localhost:8084/api/:path*"
}, {
source: "/admin-api/:path*",
destination: "http://localhost:8082/api/:path*"
},
];
}
return process.env.NODE_ENV === "development"
? [
{
source: "/api/:path*",
destination: "http://localhost:8084/api/:path*",
},
{
source: "/admin-api/:path*",
destination: "http://localhost:8082/api/:path*",
},
]
: [];
},
};
module.exports = nextConfig;