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)
This commit is contained in:
subodh committed 2026-03-13 11:09:54 +05:30
1 parent 789c8cebf4
commit 7674f12c5e
2 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />
import "./.next/types/routes.d.ts";
import "./.next/dev/types/routes.d.ts";
// NOTE: This file should not be edited
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
+8
View File
@@ -1,6 +1,14 @@
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 [
{