class TrustProxies (View source)
| protected array<int,string>|string|null | $proxies | The trusted proxies for the application. | |
| protected int | $headers | The trusted proxies headers for the application. | |
| static protected array<int,string>|string|null | $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. |
| mixed | handle(Request $request, Closure $next)
Handle an incoming request. | |
| void | setTrustedProxyIpAddresses(Request $request)
Sets the trusted proxies on the request. | |
| void | setTrustedProxyIpAddressesToSpecificIps(Request $request, array $trustedIps)
Specify the IP addresses to trust explicitly. | |
| void | setTrustedProxyIpAddressesToTheCallingIp(Request $request)
Set the trusted proxy to be the IP address calling this servers. | |
| int | getTrustedHeaderNames()
Retrieve trusted header name(s), falling back to defaults if config not set. | |
| int | headers()
Get the trusted headers. | |
| array|string|null | proxies()
Get the trusted proxies. | |
| static void | at(array|string $proxies)
Specify the IP addresses of proxies that should always be trusted. | |
| static void | withHeaders(int $headers)
Specify the proxy headers that should always be trusted. | |
| static void | flushState()
Flush the state of the middleware. |
Sets the trusted proxies on the request.
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 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 the state of the middleware.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Http/Middleware/TrustProxies.html