fix: add API proxy via Next rewrites + fix hardcoded localhost URLs

This commit is contained in:
Erik Silva
2025-12-09 02:17:00 -03:00
parent 86e4afb916
commit 773172c63c
2 changed files with 13 additions and 3 deletions

View File

@@ -4,6 +4,16 @@ const nextConfig: NextConfig = {
experimental: {
externalDir: true,
},
async rewrites() {
return {
beforeFiles: [
{
source: "/api/:path*",
destination: "http://backend:8080/api/:path*",
},
],
};
},
};
export default nextConfig;