TrustProxies
class TrustProxies
Properties
| protected null|array<int, string>|string | $proxies | The trusted proxies for the application. |
|
| protected int|string | $headers | The trusted proxies headers for the application. |
|
| static protected null|array<int, string>|string | $alwaysTrustProxies | The proxies that have been configured to always be trusted. |
|
| static protected int|null | $alwaysTrustHeaders | The proxies headers that have been configured to always be trusted. |
Methods
Specify the IP addresses to trust explicitly.
Set the trusted proxies to catchall addresses for IPv4 and IPv6.
Resolve the trusted-header bitmask.
Get the trusted headers.
Get the trusted proxies.
Specify the IP addresses of proxies that should always be trusted.
Specify the proxy headers that should always be trusted.
Flush all static state.
Details
at line 61
protected void
setTrustedProxyIpAddresses(Request $request)
Set the trusted proxies on the request.
at line 85
protected void
setTrustedProxyIpAddressesToSpecificIps(Request $request, array $trustedIps)
Specify the IP addresses to trust explicitly.
at line 99
protected void
setTrustedProxyIpAddressesToTheCallingIp(Request $request)
Set the trusted proxies to catchall addresses for IPv4 and IPv6.
at line 109
protected int
getTrustedHeaderNames()
Resolve the trusted-header bitmask.
at line 134
protected int|string
headers()
Get the trusted headers.
at line 142
protected array|string|null
proxies()
Get the trusted proxies.
at line 153
static void
at(array|string $proxies)
Specify the IP addresses of proxies that should always be trusted.
Boot-only. The list persists in a static property for the worker lifetime and applies to every subsequent request.
at line 164
static void
withHeaders(int $headers)
Specify the proxy headers that should always be trusted.
Boot-only. The header set persists in a static property for the worker lifetime and applies to every subsequent request.
at line 172
static void
flushState()
Flush all static state.