codeinc/psr15-middlewares

This package is abandoned and no longer maintained. The author suggests using the codeinc/security-middleware package instead.

A collection a PSR-15 middlewares

2.3.2-beta.1 2018-05-02 17:42 UTC

README

⚠️ This library is deprecated and should not be used.

It is replaced by the following packages offering the same fonctonnalities in a more portable way:

codeinc/http-headers-middleware

Provides the folowing middleware:

  • AddHttpHeadersMiddleware Adds HTTP headers to the response
  • CacheMiddleware Adds cache headers to the response
  • NoCacheMiddleware Adds cache prevention headers to the response
  • PoweredByMiddleware Adds a X-Powered-By HTTP headers to the response
  • HttpVersionCheckMiddleware Insure that the HTTP version of the response is the same of the version used for the request.

codeinc/robots-txt-middleware

Provides the folowing middleware:

codeinc/sitemap-middlware

Provides the folowing middleware:

codeinc/compatibility-middleware

Provides the folowing middleware:

  • PhpGpcVarsMiddleware Extract PSR-7 request data to PHP GPC variables $_GET, $_POST, $_COOKIE and $_SERVER
  • PhpSessionMiddleware Read sesion cookie from PSR-7 requests and add session cookie to PSR-7 responses

codeinc/security-middleware

Provides the folowing middleware:

  • ContentSecurityPolicyMiddleware Adds a Content-Security-Policy HTTP headers to the response
  • ContentTypeOptionsMiddleware Adds a X-Content-Type-Options HTTP headers to the response
  • ExpectCtMiddleware Adds a Expect-CT HTTP headers to the response
  • FrameOptionsMiddleware Adds a X-Frame-Options HTTP headers to the response
  • ReferrerPolicyMiddleware Adds a Referrer-Policy HTTP headers to the response
  • StrictTransportSecurityMiddleware Adds a Strict-Transport-Security HTTP headers to the response
  • XssProtectionMiddleware Adds a X-Xss-Protection HTTP headers to the response
  • BlockUnsecureRequestsMiddleware Blocks unsecure (other than HTTPS) requests responses

Abandoned middleware

The following middleware are abandoned:

  • CallableMiddleware Uses a callable as a middleware
  • ExceptionCaptureMiddleware Captures exceptions thrown during the handling of the request

License

The library is published under the MIT license (see LICENSE file).