Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"expire" option issue #15

Open
malek0512 opened this issue Aug 4, 2015 · 2 comments
Open

"expire" option issue #15

malek0512 opened this issue Aug 4, 2015 · 2 comments

Comments

@malek0512
Copy link

I have an issue with the middleware feature when "expire" option is not specified. X-RateLimit-Remaning is only decremented by 1.
When I take a look to redis monitor with the command below

redis-cli monitor

I don't see any SET event, unlike the case when the "expire" option is specified.
Is it Redis bug function ?

The code :

    var option = {
        lookup : 'user.id',
        total : '10'
    }
    router.get('/', limiter(option), action);
@ded
Copy link
Owner

ded commented Aug 4, 2015

It's not a Redis, but, but maybe a library flaw of express-limiter. The fact is, you've left out a required field since you need to add expire

@malek0512
Copy link
Author

Thank you for your quick response.
My bad, I didn't notice that "expire" field was required. I should have read the documentation more carefully.
However, it would be nice to have this as a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants