DEV Community

thedevkim
thedevkim

Posted on

laravel post spam protection

Hi, my project is almost finish and ready to be publish. But first, I would like to ask on how you handle excess or massive spam on post request?

I use react as my front end and laravel as my api end points.

I would like to ask on how you guys handle spam protection on massive post request specially on '/login/' POST request. Thank you

Top comments (2)

Collapse
 
brandinchiu profile image
Brandin Chiu • Edited

If I don't need anything super powerful, I use a "leaky bucket" limiter for my unauthenticated apis.

These can be set up quickly and easily in redis, and integrates pretty easily into a laravel project as a middleware.

Collapse
 
rahulalam31 profile image
Rahul Alam

It's very late to reply here. But doing for everyone.
I had recently face a similar situation, so i have build a laravel package that blocks all the spam ip address all over the world.

Here is a link to the blog..
dev.to/rahulalam31/preventing-spam...