Fix: Use specific container name to avoid DNS conflict with other backend containers

This commit is contained in:
TheMaddax 2025-11-07 16:44:07 -06:00
parent 4abdf9c367
commit eb7983f0ba

View file

@ -35,7 +35,8 @@ export async function DELETE(
async function proxyToBackend(request: NextRequest, pathSegments: string[]) { async function proxyToBackend(request: NextRequest, pathSegments: string[]) {
const path = pathSegments.join('/'); const path = pathSegments.join('/');
const backendUrl = `http://backend:3001/api/${path}`; // Use the full container name to avoid DNS conflicts with other backend containers
const backendUrl = `http://mad-lawsuit-backend-1:3001/api/${path}`;
// Get the search params from the original request // Get the search params from the original request
const searchParams = request.nextUrl.searchParams.toString(); const searchParams = request.nextUrl.searchParams.toString();