import type { NextConfig } from "next"; const nextConfig: NextConfig = { allowedDevOrigins: ["192.168.18.8"], experimental: { // The Next.js proxy layer buffers request bodies in memory; the default // cap is 10 MB. Raise it to 300 MB so that large file uploads are not // truncated before they reach the FastAPI backend (which itself enforces // 50 MB for unauthenticated and 250 MB for authenticated requests). proxyClientMaxBodySize: "300mb", }, async rewrites() { return [ { source: "/api/:path*", destination: "http://localhost:8000/:path*", }, ]; }, }; export default nextConfig;