SecurityHeadersMiddleware
in package
implements
MiddlewareInterface
Class SecurityHeadersMiddleware
Interfaces, Classes and Traits
- MiddlewareInterface
Table of Contents
- $finder : NamespaceConfigurationFinder
- __construct() : mixed
- SecurityHeadersMiddleware constructor.
- process() : ResponseInterface
- Add "X-Frame-Options" header if content type is html.
- isConfigEnabled() : bool
- Checks if given configuration key represents an enabled configuration.
Properties
$finder
private
NamespaceConfigurationFinder
$finder
Methods
__construct()
SecurityHeadersMiddleware constructor.
public
__construct(ConfigurationFinderBuilder $builder) : mixed
Parameters
- $builder : ConfigurationFinderBuilder
Return values
mixed —process()
Add "X-Frame-Options" header if content type is html.
public
process(ServerRequestInterface $request, RequestHandlerInterface $handler) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $handler : RequestHandlerInterface
Tags
Return values
ResponseInterface —isConfigEnabled()
Checks if given configuration key represents an enabled configuration.
private
isConfigEnabled(string $configKey) : bool
Parameters
- $configKey : string