TrustHosts

abstract class TrustHosts (View source)

Properties

protected Application $app The application instance.

Methods

void __construct(Application $app)

Create a new middleware instance.

array hosts()

Get the host patterns that should be trusted.

Response handle(Request $request, callable $next)

Handle the incoming request.

bool shouldSpecifyTrustedHosts()

Determine if the application should specify trusted hosts.

string|null allSubdomainsOfApplicationUrl()

Get a regular expression matching the application URL and all of its subdomains.

Details

void __construct(Application $app)

Create a new middleware instance.

Parameters

Application $app

Return Value

void

abstract array hosts()

Get the host patterns that should be trusted.

Return Value

array

Response handle(Request $request, callable $next)

Handle the incoming request.

Parameters

Request $request
callable $next

Return Value

Response

protected bool shouldSpecifyTrustedHosts()

Determine if the application should specify trusted hosts.

Return Value

bool

protected string|null allSubdomainsOfApplicationUrl()

Get a regular expression matching the application URL and all of its subdomains.

Return Value

string|null

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/7.x/Illuminate/Http/Middleware/TrustHosts.html