W
W
wagwandude2017-10-15 16:55:59
Laravel
wagwandude, 2017-10-15 16:55:59

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

1 answer(s)
D
Dimonchik, 2017-10-15
@dimonchik2013

Yeah
, just don’t show Google, it won’t appreciate jokes
+ requests for requests are different: you need to put on some, on some it’s not necessary

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question