\Framework\MiddlewareRefererCheckMiddleware

Summary

Methods
Properties
Constants
__construct()
handle()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
isHostAllowed()
matchPath()
$allowedHosts
$allowedSchemes
$except
$strict
$errorMessage
N/A

Properties

$allowedHosts

$allowedHosts : array

Type

array

$allowedSchemes

$allowedSchemes : array

Type

array

$except

$except : array

Type

array

$strict

$strict : bool

Type

bool

$errorMessage

$errorMessage : string

Type

string

Methods

__construct()

__construct(array  $allowedHosts, array  $allowedSchemes = ['https'], array  $except = [], bool  $strict = false, string  $errorMessage = 'Invalid request origin.') : mixed

Parameters

array $allowedHosts
array $allowedSchemes
array $except
bool $strict
string $errorMessage

Returns

mixed —

handle()

handle(\Symfony\Component\HttpFoundation\Request  $request, callable  $next) : \Symfony\Component\HttpFoundation\Response

Parameters

\Symfony\Component\HttpFoundation\Request $request
callable $next

Returns

\Symfony\Component\HttpFoundation\Response —

isHostAllowed()

isHostAllowed(string  $host) : bool

Parameters

string $host

Returns

bool —

matchPath()

matchPath(string  $path, string  $pattern) : bool

Parameters

string $path
string $pattern

Returns

bool —