MediaWiki master
MediaWiki\Request\ProxyLookup Class Reference

Public Member Functions

 __construct ( $proxyServers, $proxyServersComplex, HookContainer $hookContainer)
 
 isConfiguredProxy ( $ip)
 Checks if an IP matches a proxy we've configured.
 
 isTrustedProxy ( $ip)
 Checks if an IP is a trusted proxy provider.
 

Detailed Description

Since
1.28

Definition at line 31 of file ProxyLookup.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\Request\ProxyLookup::__construct ( $proxyServers,
$proxyServersComplex,
HookContainer $hookContainer )
Parameters
string[]$proxyServersSimple list of IPs
string[]$proxyServersComplexComplex list of IPs/ranges
HookContainer$hookContainer

Definition at line 50 of file ProxyLookup.php.

Member Function Documentation

◆ isConfiguredProxy()

MediaWiki\Request\ProxyLookup::isConfiguredProxy ( $ip)

Checks if an IP matches a proxy we've configured.

Parameters
string$ip
Returns
bool

Definition at line 66 of file ProxyLookup.php.

Referenced by MediaWiki\Request\ProxyLookup\isTrustedProxy().

◆ isTrustedProxy()

MediaWiki\Request\ProxyLookup::isTrustedProxy ( $ip)

Checks if an IP is a trusted proxy provider.

Useful to tell if X-Forwarded-For data is possibly bogus. CDN cache servers for the site are allowed.

Parameters
string$ip
Returns
bool

Definition at line 87 of file ProxyLookup.php.

References MediaWiki\Request\ProxyLookup\isConfiguredProxy().


The documentation for this class was generated from the following file: