Cross-framework module for thecodingmachine/csrf-header-check-middleware

v1.1.0 2018-02-27 16:46 UTC

This package is auto-updated.

Last update: 2024-04-06 23:01:53 UTC


Latest Stable Version Latest Unstable Version License

TheCodingMachine's CSRF header checker middleware universal module

This package integrates the TheCodingMachine's CSRF header checker middleware in any container-interop compatible framework/container.


composer require thecodingmachine/csrf-header-check-middleware-universal-module

Once installed, you need to register the TheCodingMachine\Middlewares\CsrfHeaderCheckMiddlewareServiceProvider into your container.

If your container supports thecodingmachine/discovery integration, you have nothing to do. Otherwise, refer to your framework or container's documentation to learn how to register service providers.


This middleware checks HTTP header to prevent CSRF attacks. This service provider adds the middleware at the beginning of the stack.

Provided services

This service provider provides the following services:

Service name Description
TheCodingMachine\Middlewares\CsrfHeaderCheckMiddlewareServiceProvider The CSRF checker middleware

Extended services

This service provider extends those services:

Name Compulsory Description
MiddlewareListServiceProvider::MIDDLEWARES_QUEUE no This service providers inserts the CSRF middleware in the middleware queue.