TrustProxies
class TrustProxies (View source)
Properties
| protected array|string|null | $proxies | The trusted proxies for the application. |
|
| protected int | $headers | The proxy header mappings. |
Methods
Specify the IP addresses to trust explicitly.
Set the trusted proxy to be the IP address calling this servers.
Retrieve trusted header name(s), falling back to defaults if config not set.
Get the trusted proxies.
Details
protected void
setTrustedProxyIpAddresses(Request $request)
Sets the trusted proxies on the request.
protected void
setTrustedProxyIpAddressesToSpecificIps(Request $request, array $trustedIps)
Specify the IP addresses to trust explicitly.
protected void
setTrustedProxyIpAddressesToTheCallingIp(Request $request)
Set the trusted proxy to be the IP address calling this servers.
protected int
getTrustedHeaderNames()
Retrieve trusted header name(s), falling back to defaults if config not set.
protected array|string|null
proxies()
Get the trusted proxies.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.