AllowedHostsMiddleware

final readonly class \TYPO3\CMS\Core\Http\Client\AllowedHostsMiddleware

Guzzle client middleware for filtering allowed request targets (SSRF prevention)

Table of Contents

Methods

__construct()  : mixed
__invoke()  : callable(RequestInterface $request, array $options): PromiseInterface

Methods

__construct()

public __construct(string $context, array $allowedHosts) : mixed

Parameters

$context : string
$allowedHosts : array

__invoke()

public __invoke(callable(RequestInterface, array): PromiseInterface $nextHandler) : callable(RequestInterface $request, array $options): PromiseInterface

Parameters

$nextHandler : callable(RequestInterface, array): PromiseInterface

Return values

callable(RequestInterface $request, array $options): PromiseInterface
On this page