079b507327
Adds an API config option that disables warning a user when their API response body is over 4 megs. This has been added for users who'd like to stream larger amounts of data from their API acknowledging the drawbacks. This config mirrors the existing [`externalResolver` config](https://nextjs.org/docs/api-routes/api-middlewares#custom-config). Closes: [#33162](https://github.com/vercel/next.js/issues/33162) Co-authored-by: JJ Kasper <22380829+ijjk@users.noreply.github.com>
10 lines
158 B
JavaScript
10 lines
158 B
JavaScript
export const config = {
|
|
api: {
|
|
responseLimit: '5mb',
|
|
},
|
|
}
|
|
|
|
export default (req, res) => {
|
|
let body = '.'.repeat(6 * 1024 * 1024)
|
|
res.send(body)
|
|
}
|