fix: dashboard API proxy - use server-side rewrite instead of client-side URL

This commit is contained in:
2026-02-07 11:30:16 -03:00
parent 97ca887649
commit 75f247e036
2 changed files with 3 additions and 2 deletions

View File

@@ -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*`,
}, },
]; ];
}, },

View File

@@ -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