PHP Class Psr7Middlewares\Middleware\Https

Inheritance: use trait Psr7Middlewares\Utils\RedirectTrait
Afficher le fichier Open project: oscarotero/psr7-middlewares

Méthodes publiques

Méthode Description
__construct ( ) Set basic config.
__invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface Execute the middleware.
checkHttpsForward ( boolean $checkHttpsForward = true ) : self Configure whether check the following headers before redirect: X-Forwarded-Proto: https X-Forwarded-Port: 443.
includeSubdomains ( boolean $includeSubdomains = true ) : self Configure the includeSubDomains HSTS directive.
maxAge ( integer $maxAge ) : self Configure the max-age HSTS in seconds.

Method Details

__construct() public méthode

Set basic config.
public __construct ( )

__invoke() public méthode

Execute the middleware.
public __invoke ( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface
$request Psr\Http\Message\ServerRequestInterface
$response Psr\Http\Message\ResponseInterface
$next callable
Résultat Psr\Http\Message\ResponseInterface

checkHttpsForward() public méthode

Configure whether check the following headers before redirect: X-Forwarded-Proto: https X-Forwarded-Port: 443.
public checkHttpsForward ( boolean $checkHttpsForward = true ) : self
$checkHttpsForward boolean
Résultat self

includeSubdomains() public méthode

Configure the includeSubDomains HSTS directive.
public includeSubdomains ( boolean $includeSubdomains = true ) : self
$includeSubdomains boolean
Résultat self

maxAge() public méthode

Configure the max-age HSTS in seconds.
public maxAge ( integer $maxAge ) : self
$maxAge integer
Résultat self