/psr15-middlewares

A collection a PSR-15 middleware [⚠️ this library is deprecated]

Primary LanguagePHPMIT LicenseMIT

PSR-15 middleware

⚠️ 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:

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.

Provides the folowing middleware:

Provides the folowing 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

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).