next.js
85383a6f - [ppr] Configuration for max react headers length (#67715)

Commit
1 year ago
[ppr] Configuration for max react headers length (#67715) ### What? This exposes a new `reactMaxHeadersLength` config option for `next.config.js`: ```js module.exports = { reactMaxHeadersLength: 1000, } ``` That allows configuration of the maximum value of all the headers generated from React. Currently only added when the experimental partial prerendering (PPR) feature is enabled, this today only affects the size of the `Link` header that is emitted which contains preloads for assets like fonts. This also bumps the default value from 600 to 6000. ### Why? Some proxies may have differing support for max header sizes, so this was added as a configuration option to allow users to better control the output experience in these cases. At the time of writing, most proxies support a maximum of 8k bytes in the header, which is above the default 6k, allowing for other headers written by Next.js. --------- Co-authored-by: Sam Ko <sam@vercel.com>
Author
Parents
Loading