fix: dashboard API proxy - use server-side rewrite instead of client-side URL
This commit is contained in:
@@ -6,7 +6,7 @@ const nextConfig = {
|
|||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
source: '/api/:path*',
|
source: '/api/:path*',
|
||||||
destination: `${process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080'}/api/:path*`,
|
destination: `${process.env.API_URL || 'http://server:8080'}/api/:path*`,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -65,7 +65,8 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
environment:
|
environment:
|
||||||
- NEXT_PUBLIC_API_URL=http://localhost:8080
|
- NEXT_PUBLIC_API_URL=
|
||||||
|
- API_URL=http://server:8080
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
depends_on:
|
depends_on:
|
||||||
- server
|
- server
|
||||||
|
|||||||
Reference in New Issue
Block a user