To prevent brute force attacks or overloads on your application, you need to implement a rate limiter to limit the number of requests a user is able to send to your application.
In FoalTS you can implement a rate limiter like the express-rate-limit package by creating a customized
express object and passing it as a parameter to the FoalTS
Note: Because the rate limiter response for rate limited requests does not get handled by FoalTS and its hooks, you need to manually set the default FoalTS headers to the response object of the rate limiter in its
handlefunction. If you don't manually set any headers only the default Express.js headers will be set in the response.
If you need CORS headers in a rate limited response, you will need to manually add the headers in the rate limiter
handler function accordingly.