Class CspMiddleware
Content Security Policy Middleware
Namespace: Cake\Http\Middleware
Property Summary
-
$csp protected
ParagonIE\CSPBuilder\CSPBuilderCSP Builder
Method Summary
-
__construct() public
Constructor
-
process() public
Serve assets if the path matches one.
Method Detail
__construct() ¶ public
__construct(ParagonIE\CSPBuilder\CSPBuilder|array $csp)
Constructor
Parameters
-
ParagonIE\CSPBuilder\CSPBuilder|array$csp CSP object or config array
Throws
RuntimeExceptionprocess() ¶ public
process(ServerRequestInterface $request, RequestHandlerInterface $handler): Psr\Http\Message\ResponseInterface
Serve assets if the path matches one.
Processes an incoming server request in order to produce a response. If unable to produce the response itself, it may delegate to the provided request handler to do so.
Parameters
-
ServerRequestInterface$request The request.
-
RequestHandlerInterface$handler The request handler.
Returns
Psr\Http\Message\ResponseInterfaceA response.