tunnckoCore / koa-better-ratelimit

:rocket: Smart and easy request rate limiter for your APIs built on `koa`, using `koa-ip-filter`. Support custom stores, custom ID, custom error messages and custom headers.
http://j.mp/1stW47C
MIT License
38 stars 6 forks source link

How to disable this in development/testing environment? #10

Closed ethanyoung closed 8 years ago

ethanyoung commented 8 years ago

Having ratelimit in development/testing environment makes testing work hard, as we always need to wait...

Is there any way to disable this in development/testing environment?

tunnckoCore commented 8 years ago

Just not include the middleware if process.env.DEVELOPMENT or something..

All is just a matter of thinking(tm). Why any would need it in dev env (dev time)? I don't seeing the case.

tunnckoCore commented 8 years ago

Im working on next release, so we can think for something if needed.

ethanyoung commented 8 years ago

Thanks for the reply!

Currently, adding a condition for the environment is one solution to this.