redirectMiddleware
Table of Contents
-
HISTORY_HEADER
= 'X-Proxy-Redirect-History'
-
STATUS_HISTORY_HEADER
= 'X-Proxy-Redirect-Status-History'
-
$defaultSettings
: mixed
-
$nextHandler
: mixed
-
__construct()
: mixed
-
__invoke()
: mixed
-
checkRedirect()
: mixed
-
modifyRequest()
: mixed
-
guardMax()
: mixed
-
redirectUri()
: mixed
-
withTracking()
: mixed
public
mixed
HISTORY_HEADER
= 'X-Proxy-Redirect-History'
public
mixed
STATUS_HISTORY_HEADER
= 'X-Proxy-Redirect-Status-History'
$defaultSettings
public
static mixed
$defaultSettings
= ['max' => 5, 'protocols' => ['http', 'https'], 'strict' => false, 'referer' => false, 'track_redirects' => false]
$nextHandler
private
mixed
$nextHandler
__construct()
public
__construct(callable $nextHandler) : mixed
Parameters
-
$nextHandler
: callable
-
Return values
mixed
—
__invoke()
public
__invoke(requestInterface $request, array<string|int, mixed> $options) : mixed
Parameters
-
$request
: requestInterface
-
-
$options
: array<string|int, mixed>
-
Return values
mixed
—
checkRedirect()
public
checkRedirect(requestInterface $request, array<string|int, mixed> $options, responseInterface $response) : mixed
Parameters
-
$request
: requestInterface
-
-
$options
: array<string|int, mixed>
-
-
$response
: responseInterface
-
Return values
mixed
—
modifyRequest()
public
modifyRequest(requestInterface $request, array<string|int, mixed> $options, responseInterface $response) : mixed
Parameters
-
$request
: requestInterface
-
-
$options
: array<string|int, mixed>
-
-
$response
: responseInterface
-
Return values
mixed
—
guardMax()
private
guardMax(requestInterface $request, array<string|int, mixed> &$options) : mixed
Parameters
-
$request
: requestInterface
-
-
$options
: array<string|int, mixed>
-
Return values
mixed
—
redirectUri()
private
redirectUri(requestInterface $request, responseInterface $response, array<string|int, mixed> $protocols) : mixed
Parameters
-
$request
: requestInterface
-
-
$response
: responseInterface
-
-
$protocols
: array<string|int, mixed>
-
Return values
mixed
—
withTracking()
private
withTracking(promiseInterface $promise, mixed $uri, mixed $statusCode) : mixed
Parameters
-
$promise
: promiseInterface
-
-
$uri
: mixed
-
-
$statusCode
: mixed
-
Return values
mixed
—