marko / cors
CORS middleware and configuration for Marko Framework
0.11.0
2026-10-06 14:16 UTC
Requires
- php: ^8.5
- marko/config: 0.11.0
- marko/core: 0.11.0
- marko/routing: 0.11.0
Requires (Dev)
- marko/testing: 0.11.0
- pestphp/pest: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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
The middleware registers itself globally, so preflights and cross-origin responses are handled as soon as you allow an origin:
CORS_ALLOWED_ORIGINS=https://app.example.com
CORS_PATHS=api/*
Documentation
Full usage, API reference, and examples: marko/cors