Index: trunk/extensions/MobileFrontend/MobileFrontend.body.php |
— | — | @@ -725,7 +725,18 @@ |
726 | 726 | } else { |
727 | 727 | $ip = null; |
728 | 728 | } |
729 | | - if ( wfIsTrustedProxy ( $ip )) { |
| 729 | + |
| 730 | + /** |
| 731 | + * Compatibility with potentially new function wfIsConfiguredProxy() |
| 732 | + * wfIsConfiguredProxy() checks an IP against the list of configured |
| 733 | + * Squid servers and currently only exists in trunk. |
| 734 | + * wfIsTrustedProxy() does the same, but also exposes a hook that is |
| 735 | + * used on the WMF cluster to check and see if an IP address matches |
| 736 | + * against a list of approved open proxies, which we don't actually |
| 737 | + * care about. |
| 738 | + */ |
| 739 | + $trustedProxyCheckFunction = ( function_exists( 'wfIsConfiguredProxy' )) ? 'wfIsConfiguredProxy' : 'wfIsTrustedProxy'; |
| 740 | + if ( $trustedProxyCheckFunction( $ip )) { |
730 | 741 | $wgRequest->response()->header( 'Cache-Control: no-cache, must-revalidate' ); |
731 | 742 | $wgRequest->response()->header( 'Expires: Sat, 26 Jul 1997 05:00:00 GMT' ); |
732 | 743 | $wgRequest->response()->header( 'Pragma: no-cache' ); |