creativelive / hapi-ratelimit

Hapi rate limiting module
MIT License
33 stars 15 forks source link

Hapi 8 support #14

Closed franciscogouveia closed 9 years ago

franciscogouveia commented 9 years ago

The changes I've made are stable now for a hapi 8 release. Refactored also the testserver.js file with hapi 8 code.

To test it:

node tests/testserver.js

When the limit is reached, the following response is given (as expected):

{"statusCode":429,"error":"Too Many Requests","message":"Rate limit exceeded"}

Note: might be not backward compatible with older versions of hapi.

cl-aaron commented 9 years ago

Awesome Thank!