Files
subodh 7674f12c5e config: add proxyClientMaxBodySize and allowedDevOrigins
- Set experimental.proxyClientMaxBodySize to 300mb so the Next.js proxy
  layer does not truncate uploads before they reach the FastAPI backend
  (backend enforces 50 MB unauth / 250 MB auth)
- Add allowedDevOrigins for 192.168.18.8 to suppress the cross-origin
  dev warning when accessing the dev server from the local network
- Regenerate next-env.d.ts (build path change, no functional effect)
2026-03-13 11:09:54 +05:30

23 lines
655 B
TypeScript

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;