Zend\Http\PhpEnvironment\RemoteAddress
Functionality for determining client IP address.
Synopsis
class RemoteAddress
{
- // members
- protected bool $useProxy;
- protected array $trustedProxies;
- protected string $proxyHeader;
- // methods
- public RemoteAddress setUseProxy()
- public bool getUseProxy()
- public RemoteAddress setTrustedProxies()
- public RemoteAddress setProxyHeader()
- public string getIpAddress()
- protected false|string getIpAddressFromProxy()
- protected string normalizeProxyHeader()
Members
protected
- $proxyHeader
—
string
HTTP header to introspect for proxies - $trustedProxies
—
array
List of trusted proxy IP addresses - $useProxy
—
Zend\Http\PhpEnvironment\bool
Whether to use proxy addresses or not.
Methods
protected
- getIpAddressFromProxy() — Attempt to get the IP address for a proxied client
- normalizeProxyHeader() — Normalize a header string
public
- getIpAddress() — Returns client IP address.
- getUseProxy() — Checks proxy handling setting.
- setProxyHeader() — Set the header to introspect for proxy IPs
- setTrustedProxies() — Set list of trusted proxy addresses
- setUseProxy() — Changes proxy handling setting.