booth-pic-api / frontend /next.config.mjs
github-actions
Deploy to HF (clean history with LFS)
e666301
/** @type {import('next').NextConfig} */
const nextConfig = {
rewrites: async () => {
// Fallback to localhost if not specified
const apiUrl = process.env.NEXT_PUBLIC_API_URL || 'http://127.0.0.1:8000';
return [
{
source: '/api/:path*',
destination: `${apiUrl}/api/:path*`,
},
]
},
};
export default nextConfig;