Send a large response with NodeJs runtime

There is any kind of limit to send a large response using a NodeJS runtime? I’m getting an error, like response ends after donwload always around 1.2mb only. The implementation is below:

app.post("/test", async (req, res) => {
  const {
    body: { source },
  } = req;

  const request = await fetch(source);
  const data = await request.text();

  res.status(206)
  res.setHeader("Content-Type", "text/html; charset=utf-8")
  res.send(data)
})

Hi, and welcome @leandrocunha!

Could you share more on the error messages you’re getting? It’d help us a lot!

Hi @pawlean

There is no error, the response has a 200 status code, normal. The issue is that I know that the source has more than 10mb to be fetched and I got only 1.2mb. I’m wondering if there is a kind of default timeout from the Vercel side or I need to implement the headers correctly. I don’t know