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 [
|
||||
{
|
||||
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:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
- NEXT_PUBLIC_API_URL=http://localhost:8080
|
||||
- NEXT_PUBLIC_API_URL=
|
||||
- API_URL=http://server:8080
|
||||
- NODE_ENV=production
|
||||
depends_on:
|
||||
- server
|
||||
|
||||
Reference in New Issue
Block a user