marko/rate-limiting

Rate limiting for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-rate-limiting

Type:marko-module

pkg:composer/marko/rate-limiting

Statistics

Installs: 4

Dependents: 0

Suggesters: 0

Stars: 0

0.0.1 2026-03-25 17:53 UTC

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