class AllowedHostsMiddleware implements HTTPMiddleware

Secures requests by only allowing a whitelist of Host values

Methods

array
getAllowedHosts()

No description

$this
setAllowedHosts(array|string $allowedHosts)

Sets the list of allowed Host header values Can also specify a comma separated list

process(HTTPRequest $request, callable $delegate)

No description

Details

at line 24
array getAllowedHosts()

Return Value

array List of allowed Host header values

at line 36
$this setAllowedHosts(array|string $allowedHosts)

Sets the list of allowed Host header values Can also specify a comma separated list

Parameters

array|string $allowedHosts

Return Value

$this

at line 48
HTTPResponse process(HTTPRequest $request, callable $delegate)

Parameters

HTTPRequest $request
callable $delegate

Return Value

HTTPResponse