marko/cors

CORS middleware and configuration for Marko Framework

Maintainers

Package info

github.com/marko-php/marko-cors

Type:marko-module

pkg:composer/marko/cors

Statistics

Installs: 0

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:41 UTC


README

CORS middleware for Marko --- enables browser-based frontends and mobile apps to access your API by adding the correct HTTP headers automatically.

Installation

composer require marko/cors

Quick Example

use Marko\Cors\Middleware\CorsMiddleware;
use Marko\Routing\Attributes\Middleware;

#[Middleware(CorsMiddleware::class)]
class PostController
{
    public function index(): Response
    {
        // CORS headers added automatically
    }
}

Documentation

Full usage, API reference, and examples: marko/cors