marko / security
Security middleware for Marko Framework -- CSRF protection, CORS handling, and security headers
0.0.2
2026-03-25 17:53 UTC
Requires
- php: ^8.5
- marko/config: 0.0.2
- marko/core: 0.0.2
- marko/encryption: 0.0.2
- marko/routing: 0.0.2
- marko/session: 0.0.2
Requires (Dev)
- marko/testing: 0.0.2
This package is auto-updated.
Last update: 2026-03-26 16:42:24 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