Reputation: 73
I'm developing an app with NestJs where I'm using throttle module for banning abusive requests.
One thing that I couldn't find a clear answer is that if it's going to block abusive requests (for example, more than 20 requests per minute) will it also block the frontend requests made by nodejs server?
I mean getServerSideProps will make a request in every render. If our website has more than 100 visitors per minute, what will be happened in this situation? Considering that
Upvotes: 2
Views: 1837
Reputation: 2822
Your suspicion is valid because @nestjs/throttler
does not differentiate between local and remote requests so yes your NextJs
server will be blocked quickly.
I'd suggest you to use reverse proxies instead which are more mature and also does not check local requests.
Upvotes: 2