Skip to content

How to rate limit a NestJS API by multiple time intervals?

I am trying to rate limit my API with @NestJs/throttler. I want to set two different limit caps: 100 requests per 1 second 10,000 requests per 24 hours. Setting either one of these rate limits is explained in the docs and is pretty straight forwad. But, setting both limitations is not articulated in the docs.…

Node.js throws TypeError: Cannot destructure property ‘firstName’ of ‘req.body’ as it is undefined, even though it works for an other post request

So I know there are tons of similar questions out there, and I’ve read most of them in the past few days. However I didn’t find any solution to my problem. The app is about users can post memories(cards) etc… Point is, when I create a new card with POST request, there is no problem, but when…