rsnext/test/integration/api-support/pages/api/large-chunked-response.js
Maia Teegarden 538095c936
Warn when response body is larger than 5mb (#26831)
This PR adds a warning when api responses exceed 5mb since this will end up failing once deployed. In a future version this scenario will throw an error.

## Bug

- [x] Integration tests added

## Documentation / Examples

- [x] Make sure the linting passes
2021-07-02 19:27:33 +00:00

6 lines
115 B
JavaScript

export default (req, res) => {
for (let i = 0; i <= 5 * 1024 * 1024; i++) {
res.write('.')
}
res.end()
}