marko / security
Security middleware for Marko Framework -- CSRF protection, CORS handling, and security headers
0.0.1
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/config: 0.0.1
- marko/core: 0.0.1
- marko/encryption: 0.0.1
- marko/routing: 0.0.1
- marko/session: 0.0.1
Requires (Dev)
- marko/testing: 0.0.1
This package is auto-updated.
Last update: 2026-03-25 21:07:32 UTC
README
CSRF protection, CORS handling, and security headers middleware -- secure your routes with drop-in middleware.
Installation
composer require marko/security
Quick Example
use Marko\Routing\Attributes\Post; use Marko\Routing\Attributes\Middleware; use Marko\Security\Middleware\CsrfMiddleware; class FormController { #[Post('/contact')] #[Middleware(CsrfMiddleware::class)] public function submit(): Response { // Token validated automatically return new Response('Submitted'); } }
Documentation
Full usage, API reference, and examples: marko/security