Answer the question
In order to leave comments, you need to log in
How to implement a global request filter?
Hello.
A lot of functionality has been implemented on my project, and now there is a need to implement a system of protection against spammers and other ailments. For example, like VKontakte: if you send a lot of messages, a captcha will appear, and each time it will become more and more difficult.
I set myself the following task (I will listen to the corrections once):
The user (or guest) updates the profile page more than N times per second and at the next request, the user pops up a pop-up window asking them to go through reCaptcha.
I want to implement a global filter on all requests coming to the server.
I have an idea to write a Middleware that will count the number of requests and save them in sessions. At a certain step, a captcha will be thrown.
The question is: am I thinking correctly and how best to approach this task?
Laravel Version - 5.0
Thanks in advance for your help!
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question