Laravel: a middleware-based Rate limiter
This is a continuation of `Laravel: creating config file for rate limits`. Turning Rate limiter into middleware is the most “Laravel way” — so you can attach limits directly to…
This is a continuation of `Laravel: creating config file for rate limits`. Turning Rate limiter into middleware is the most “Laravel way” — so you can attach limits directly to…
This is a continuation of Laravel API uses Redis+Lua for request throttling Let’s extend the Redis + Lua rate limiter so different API endpoints can have different limits and windows.…
Laravel already has Redis support out of the box, so we can use the Redis::eval() method to run Lua scripts. 1. Store the Lua Script (rate_limit.lua) Put this in app/Services/Redis/rate_limit.lua:…