- Upgrade Next.js from 15.4.10 to 16.1.1 - Upgrade React from 19.1.0 to 19.2.3 - Rename middleware.ts → proxy.ts (Next.js 16 requirement) - Update function name: middleware → proxy - Enable proxyClientMaxBodySize configuration (now supported in Next.js 16) - Update documentation to reference Next.js 16 requirement - Fix upload size limit issue for files >10MB This upgrade fixes GitHub issue #361 where users cannot upload files larger than 10MB. The proxyClientMaxBodySize configuration option was introduced in Next.js 16.1+ and allows configuring the proxy body size limit to 100MB. Fixes #361 Related to PR #405
19 lines
442 B
TypeScript
19 lines
442 B
TypeScript
import { NextResponse } from 'next/server'
|
|
import type { NextRequest } from 'next/server'
|
|
|
|
export function proxy(request: NextRequest) {
|
|
const { pathname } = request.nextUrl
|
|
|
|
// Redirect root to notebooks
|
|
if (pathname === '/') {
|
|
return NextResponse.redirect(new URL('/notebooks', request.url))
|
|
}
|
|
|
|
return NextResponse.next()
|
|
}
|
|
|
|
export const config = {
|
|
matcher: [
|
|
'/((?!api|_next/static|_next/image|favicon.ico).*)',
|
|
],
|
|
}
|