-
-
Notifications
You must be signed in to change notification settings - Fork 218
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block request coming from hostname? #18
Comments
hey @henriquea I think I follow what you're talking about, it sounds like you're trying to use this for the "business logic" of your app, limiting how many times a user can cast a vote on a given instance of the widget, correct? That's not really what You're welcome to fork the code and adjust it to do your business logic - I think you could just change line 37 to var ip = req.ip + '-' + req.query.url; But that will automatically reset after a while, so it might not be what you actually want. Or am I misunderstanding you entirely? |
Thanks for the quick response @nfriedly 馃槑 Yes exactly! It's hard to come up with a limit number. Let's say this gets popular and is in a lot of posts. I might read ~20 articles during the day, if each article has 5 widgets isn't that hard to hit 100 requests.
You made a fair point I agree. I wouldn't mind if reset after a while, I think this is the right behaviour. Cheers |
@nfriedly closing this issue now, since we have an alternative. Thanks again! |
First of all, really good project @nfriedly 馃檶
I just released this project heymoji.cool. The problem I'm facing right now is because you can embed heymoji using
iframe
I can't just block by IP. Otherwise when I hit the limit I can't "vote" in other sites as well.Trying to find a way where I can detect the requests coming from X and block it by hostname. So if I hit the fire emoji 100 time on
a.com
the limit is set, however I still can go tob.com
and vote there.Does it make sense? Do you have any suggestion?
Cheers
The text was updated successfully, but these errors were encountered: