Manual:$wgUsePrivateIPs

Details
Determines whether MediaWiki will trust an X-Forwarded-For header specifying a private IP in requests from a trusted forwarding proxy.