Co-authored-by: Thanh Quy - wolf <524H0124@student.tdtu.edu.vn> Reviewed-on: #37 Co-authored-by: TaNguyenThanhQuy <tanguyenthanhquy@noreply.localhost> Co-committed-by: TaNguyenThanhQuy <tanguyenthanhquy@noreply.localhost>
This commit was merged in pull request #37.
This commit is contained in:
+6
-9
@@ -20,16 +20,13 @@ const nextConfig: NextConfig = {
|
||||
],
|
||||
},
|
||||
async rewrites() {
|
||||
const rewrites = [];
|
||||
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
rewrites.push({
|
||||
const gatewayUrl = "http://localhost:32080";
|
||||
return [
|
||||
{
|
||||
source: "/api/:path*",
|
||||
destination: "http://host.docker.internal:32080/api/:path*",
|
||||
});
|
||||
}
|
||||
|
||||
return rewrites;
|
||||
destination: `${gatewayUrl}/api/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user