Class CspMiddleware

Content Security Policy Middleware

Properties summary

  • $csp protected
    \ParagonIE\CSPBuilder\CSPBuilder

    CSP Builder

Method Summary

Method Detail

__construct() public

__construct(mixed $csp)

Constructor

Parameters

\ParagonIE\CSPBuilder\CSPBuilder|array $csp

CSP object or config array

Throws

RuntimeException

process() public

process(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Server\RequestHandlerInterface $handler)

Serve assets if the path matches one.

Parameters

\Psr\Http\Message\ServerRequestInterface $request

The request.

\Psr\Http\Server\RequestHandlerInterface $handler

The request handler.

Returns

\Psr\Http\Message\ResponseInterface

A response.

Property Detail

$csp protected

CSP Builder

Type

\ParagonIE\CSPBuilder\CSPBuilder

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/class-Cake.Http.Middleware.CspMiddleware.html