class ValidateOrigin

Methods

__construct(Repository $config)

Create the origin middleware.

Response
handle(Request $request, Closure $next)

Reject browser origins that the application has not allowed.

string|null
origin(string $value, bool $allowPath = false)

Normalize an HTTP origin without making a network request.

Details

at line 20
__construct(Repository $config)

Create the origin middleware.

Parameters

Repository $config

at line 27
Response handle(Request $request, Closure $next)

Reject browser origins that the application has not allowed.

Parameters

Request $request
Closure $next

Return Value

Response

at line 56
protected string|null origin(string $value, bool $allowPath = false)

Normalize an HTTP origin without making a network request.

Parameters

string $value
bool $allowPath

Return Value

string|null