Manual:$wgUsePrivateIPs

From MediaWiki.org
Jump to: navigation, search

Other languages:
Deutsch • ‎English • ‎español • ‎suomi • ‎français • ‎italiano • ‎日本語 • ‎македонски • ‎polski • ‎português • ‎português do Brasil
Proxies: $wgUsePrivateIPs
Whether private X-Forwarded-For IPs should be accepted
Introduced in version: 1.14.0 (r43784)
Removed in version: still in use
Allowed values: (boolean)
Default value: false
Other settings: Alphabetical | By function


Details[edit]

Determines whether MediaWiki will trust an X-Forwarded-For (XFF) header specifying a private IP in requests from a trusted forwarding proxy. If set to false, private IP addresses in the XFF header will be ignored.

A trusted forwarding proxy is any proxy listed in either $wgSquidServersManual:$wgSquidServers or $wgSquidServersNoPurgeManual:$wgSquidServersNoPurge. Extensions can also mark proxies as trusted via the IsTrustedProxyManual:Hooks/IsTrustedProxy hook.

So if you have two traffic managers (Might be Zeus or F5) sending requests to your webservers, forwarding from an internal network, the config might be this:

$wgUsePrivateIPs = true;
$wgSquidServersNoPurge = array( '172.1.1.1', '172.1.1.2' );

See also[edit]