Spaces:
Runtime error
Runtime error
Commit History
-
Fix API connectivity in Docker Space
Root cause: NEXT_PUBLIC_API_URL was defaulting to 'http://localhost:8000' which made the browser try to reach localhost instead of using Next.js proxy. Fixes: - Remove default value for NEXT_PUBLIC_API_URL in next.config.js - Only set NEXT_PUBLIC_API_URL if explicitly provided - In Docker Space, frontend uses relative URLs (empty string) - Next.js server proxies /api/* to localhost:8000 backend - Add console.log debugging to trace API URL resolution - Add comments explaining Docker Space proxy architecture This ensures: ✅ Production: Browser -> /api/models -> Next.js proxy -> localhost:8000/api/models ✅ Dev: Browser -> http://localhost:8000/api/models (direct)d84050d -
new UI
b42dfef