Skip to content

Update the link in the request body size warning to a non-redirecting, version-specific URL#90772

Open
Kevin-Xi wants to merge 1 commit intovercel:canaryfrom
Kevin-Xi:patch-1
Open

Update the link in the request body size warning to a non-redirecting, version-specific URL#90772
Kevin-Xi wants to merge 1 commit intovercel:canaryfrom
Kevin-Xi:patch-1

Conversation

@Kevin-Xi
Copy link

@Kevin-Xi Kevin-Xi commented Mar 2, 2026

Currently, when v15 users encounter this warning and click the link (https://nextjs.org/docs/app/api-reference/config/next-config-js/middlewareClientMaxBodySize), they are redirected to the v16 proxyClientMaxBodySize page (https://nextjs.org/docs/app/api-reference/config/next-config-js/proxyClientMaxBodySize).

They also cannot switch the doc version back to v15 to reach the middlewareClientMaxBodySize page. Switching from the v16 proxyClientMaxBodySize page to v15 does not redirect to the corresponding middlewareClientMaxBodySize page.

As a result, users must first notice that the link was redirected and then manually locate the correct page. This is confusing.

@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 5a0cc92

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

1 similar comment
@nextjs-bot
Copy link
Collaborator

Allow CI Workflow Run

  • approve CI run for commit: 5a0cc92

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

console.warn(
// TODO(jiwon): Update this document link
`Request body exceeded ${bytes.format(bodySizeLimit)}${urlInfo}. Only the first ${bytes.format(bodySizeLimit)} will be available unless configured. See https://nextjs.org/docs/app/api-reference/config/next-config-js/middlewareClientMaxBodySize for more details.`
`Request body exceeded ${bytes.format(bodySizeLimit)}${urlInfo}. Only the first ${bytes.format(bodySizeLimit)} will be available unless configured. See https://nextjs.org/docs/15/app/api-reference/config/next-config-js/middlewareClientMaxBodySize for more details.`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`Request body exceeded ${bytes.format(bodySizeLimit)}${urlInfo}. Only the first ${bytes.format(bodySizeLimit)} will be available unless configured. See https://nextjs.org/docs/15/app/api-reference/config/next-config-js/middlewareClientMaxBodySize for more details.`
`Request body exceeded ${bytes.format(bodySizeLimit)}${urlInfo}. Only the first ${bytes.format(bodySizeLimit)} will be available unless configured. See https://nextjs.org/docs/app/api-reference/config/next-config-js/proxyClientMaxBodySize for more details.`

Warning message links to versioned v15 docs for the deprecated middlewareClientMaxBodySize config instead of the current proxyClientMaxBodySize docs.

Fix on Vercel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants