From fe586bbfc2387b0c2345e2450022293c9f4a691f Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Wed, 12 Jan 2005 22:45:39 +0000 Subject: [PATCH] wgSquidServersNoPurge --- includes/DefaultSettings.php | 1 + includes/Setup.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 1457612e98..5943dd049e 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -581,6 +581,7 @@ $wgCookieExpiration = 2592000; # A list of proxy servers (ips if possible) to purge on changes # don't specify ports here (80 is default) # $wgSquidServers = array('127.0.0.1'); +$wgSquidServersNoPurge = array(); # Maximum number of titles to purge in any one client operation $wgMaxSquidPurgeTitles = 400; diff --git a/includes/Setup.php b/includes/Setup.php index 05e968f0f8..0beca545f0 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -36,7 +36,8 @@ if( $wgUseSquid && isset( $_SERVER['HTTP_X_FORWARDED_FOR'] ) ) { # out where our requests are really coming from. $hopips = array_map( 'trim', explode( ',', $_SERVER['HTTP_X_FORWARDED_FOR'] ) ); - while(in_array(trim(end($hopips)), $wgSquidServers)){ + $allsquids = array_merge($wgSquidServers, $wgSquidServersNoPurge); + while(in_array(trim(end($hopips)), $allsquids)){ array_pop($hopips); } $wgIP = trim(end($hopips)); -- 2.20.1