Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php |
— | — | @@ -720,7 +720,11 @@ |
721 | 721 | // Fetch the REMOTE_ADDR and check if it's a trusted proxy. |
722 | 722 | // Is this enough, or should we actually step through the entire |
723 | 723 | // X-FORWARDED-FOR chain? |
724 | | - $ip = wfGetIP(); |
| 724 | + if ( isset( $_SERVER['REMOTE_ADDR'] ) ) { |
| 725 | + $ip = IP::canonicalize( $_SERVER['REMOTE_ADDR'] ); |
| 726 | + } else { |
| 727 | + $ip = null; |
| 728 | + } |
725 | 729 | if ( wfIsTrustedProxy ( $ip )) { |
726 | 730 | $wgRequest->response()->header( 'Cache-Control: no-cache, must-revalidate' ); |
727 | 731 | $wgRequest->response()->header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); |