File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed
Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export default rateLimit({
1313 // by the current number of instances.
1414 // We have see DDoS attempts against prod that hits the `/` endpoint
1515 // (and not following the redirect to `/en`) at roughly 200k per minute.
16- max : 100 ,
16+ max : process . env . NODE_ENV === 'test' ? 1000 : 100 ,
1717
1818 // Return rate limit info in the `RateLimit-*` headers
1919 standardHeaders : true ,
@@ -23,10 +23,6 @@ export default rateLimit({
2323 handler : ( request , response , next , options ) => {
2424 const tags = [ `url:${ request . url } ` , `ip:${ request . ip } ` ]
2525 statsd . increment ( 'middleware.rate_limit' , 1 , tags )
26- // NOTE! At the time of writing, the actual rate limiting is disabled!
27- // At least we can start recording how often this happens in Datadog.
28- // The following line is commented out and replaced with `next()`
29- // response.status(options.statusCode).send(options.message)
30- next ( )
26+ response . status ( options . statusCode ) . send ( options . message )
3127 } ,
3228} )
You can’t perform that action at this time.
0 commit comments