From: Laurent Destailleur Date: Wed, 4 Dec 2013 17:25:09 +0000 (+0100) Subject: Support for ModCloudFlareIIS. X-Git-Tag: AWSTATS_7_3~32^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bfe127edcd601f950edbb7284c34d3d64383cede;p=thirdparty%2FAWStats.git Support for ModCloudFlareIIS. --- diff --git a/wwwroot/cgi-bin/awstats.pl b/wwwroot/cgi-bin/awstats.pl index 98f3e6bd..e75ceab8 100644 --- a/wwwroot/cgi-bin/awstats.pl +++ b/wwwroot/cgi-bin/awstats.pl @@ -18411,6 +18411,12 @@ if ( $UpdateStats && $FrameName ne 'index' && $FrameName ne 'mainleft' ) 4 ); } + # Check if there's a CloudFlare Visitor IP in the query string + # If it does, replace the ip + if ( $pos_query >= 0 && $field[$pos_query] && $field[$pos_query] =~ /\[CloudFlare_Visitor_IP[:](\d+[.]\d+[.]\d+[.]\d+)\]/ ) { + $field[$pos_host] = "$1"; + } + # We found a new line #---------------------------------------- if ( $timerecord > $LastLine ) {