marko / rate-limiting
Rate limiting for Marko Framework
Package info
github.com/marko-php/marko-rate-limiting
Type:marko-module
pkg:composer/marko/rate-limiting
0.0.1
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/cache: 0.0.1
- marko/config: 0.0.1
- marko/core: 0.0.1
- marko/routing: 0.0.1
Requires (Dev)
- marko/testing: 0.0.1
- pestphp/pest: ^4.0
This package is auto-updated.
Last update: 2026-03-25 21:07:38 UTC
README
Cache-backed rate limiter with route middleware — throttle requests by IP with configurable limits and automatic Retry-After headers.
Installation
composer require marko/rate-limiting
Quick Example
use Marko\Routing\Attributes\Get; use Marko\Routing\Attributes\Middleware; use Marko\RateLimiting\Middleware\RateLimitMiddleware; class ApiController { #[Get('/api/data')] #[Middleware(RateLimitMiddleware::class)] public function index(): Response { return new Response('OK'); } }
Documentation
Full usage, API reference, and examples: marko/rate-limiting