Skip to content

marko-php/marko-security

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

marko/security

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

About

[READ-ONLY] Security middleware for Marko Framework -- CSRF protection, CORS handling, and security headers. Issues and PRs at https://github.com/marko-php/marko

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages