diff --git a/frontend/app/clientActions.ts b/frontend/app/clientActions.ts index 13d4a4a..e5a879a 100644 --- a/frontend/app/clientActions.ts +++ b/frontend/app/clientActions.ts @@ -2,8 +2,8 @@ import { VideoData } from './constants'; -// Backend API base URL -const API_BASE = process.env.NEXT_PUBLIC_API_URL || 'http://localhost:8080/api'; +// Use relative URLs - Next.js rewrites will proxy to backend +const API_BASE = '/api'; // Transform backend response to our VideoData format function transformVideo(item: any): VideoData { diff --git a/frontend/next.config.mjs b/frontend/next.config.mjs index e34dc53..072bfc1 100644 --- a/frontend/next.config.mjs +++ b/frontend/next.config.mjs @@ -14,16 +14,13 @@ const nextConfig = { ], }, async rewrites() { - const apiBase = process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:8080'; + // Backend runs on port 8080 inside the container + const apiBase = 'http://localhost:8080'; return [ { source: '/api/:path*', destination: `${apiBase}/api/:path*`, }, - { - source: '/video_proxy', - destination: `${apiBase}/video_proxy`, - }, ]; }, };