class Illuminate / Http / Middleware / TrustProxies
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

TrustProxies

Properties

protected

$proxies array|string|null

The trusted proxies for the application.

Default: null
protected

$headers int

The proxy header mappings.

Default: int

Methods

public

handle ( Request $request , Closure $next ) : mixed

Handle an incoming request.

Parameters

protected

setTrustedProxyIpAddresses ( Request $request ) : void

Sets the trusted proxies on the request.

Parameters

protected

setTrustedProxyIpAddressesToSpecificIps ( Request $request , array $trustedIps ) : void

Specify the IP addresses to trust explicitly.

Parameters

protected

setTrustedProxyIpAddressesToTheCallingIp ( Request $request ) : void

Set the trusted proxy to be the IP address calling this servers.

Parameters

protected

getTrustedHeaderNames ( ) : int

Retrieve trusted header name(s), falling back to defaults if config not set.

protected

proxies ( ) : array|string|null

Get the trusted proxies.