According to https://docs.nestjs.com/faq/raw-body you just need to add the
{
rawBody: true,
}
to receive rawBody, now I believe that will enable rawBody for every POST request, but I just wanted to use this in a single stripe webhook api route, just wanted to know if this is a safe practice to do, are there any cons to this?
Another suggestion I've found is to create a middleware such as suggested https://stackoverflow.com/questions/54346465/access-raw-body-of-stripe-webhook-in-nest-js. Now just adding a rawBody: true in bootstrap is very convenient, just wanna know what other thoughts are to this
Nest is a framework for building efficient, scalable Node.js server-side applications. It uses progressive JavaScript, is built with TypeScript and combines elements of OOP (Object Oriented Programming), FP (Functional Programming), and FRP (Functional Reactive Programming).