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