Class CspMiddleware
Content Security Policy Middleware
        
    Namespace: Cake\Http\Middleware
    
    
    
      
  
      Property Summary
- 
        $csp protectedParagonIE\CSPBuilder\CSPBuilderCSP Builder 
Method Summary
- 
          __construct() publicConstructor 
- 
          __invoke() publicApply the middleware. 
Method Detail
__construct() ¶ public
__construct(ParagonIE\CSPBuilder\CSPBuilder|array $csp)Constructor
Parameters
- 
                ParagonIE\CSPBuilder\CSPBuilder|array$csp
- CSP object or config array 
Throws
RuntimeException__invoke() ¶ public
__invoke(ServerRequestInterface $requestInterface, ResponseInterface $responseInterface, callable $next): Psr\Http\Message\MessageInterfaceApply the middleware.
This will inject the CSP header into the response.
Parameters
- 
                ServerRequestInterface$requestInterface
- The Request. 
- 
                ResponseInterface$responseInterface
- The Response. 
- 
                callable$next
- Callback to invoke the next middleware. 
Returns
Psr\Http\Message\MessageInterface