feat: add Next.js rewrite for /api → backend proxy
Routes /api/* requests to backend:8000 internally via Docker network. Replaces nginx reverse proxy with Next.js built-in rewrites.
This commit is contained in:
parent
2484a40dbd
commit
22fec7c937
1 changed files with 8 additions and 0 deletions
|
|
@ -4,6 +4,14 @@ const nextConfig: NextConfig = {
|
||||||
turbopack: {
|
turbopack: {
|
||||||
root: __dirname,
|
root: __dirname,
|
||||||
},
|
},
|
||||||
|
async rewrites() {
|
||||||
|
return [
|
||||||
|
{
|
||||||
|
source: "/api/:path*",
|
||||||
|
destination: "http://backend:8000/:path*",
|
||||||
|
},
|
||||||
|
];
|
||||||
|
},
|
||||||
images: {
|
images: {
|
||||||
remotePatterns: [
|
remotePatterns: [
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue