--------------------- PatchSet 288 Date: 2002/12/09 14:14:06 Author: apbarrett Branch: follow_xff Tag: (none) Log: Add --disable/--enable-follow-x-forwarded-for configure option (enabled by default). It sets the FOLLOW_X_FORWARDED_FOR C preprocessor variable to 0 or 1. Members: configure.in:1.11->1.11.2.1 Index: squid3/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid3/configure.in,v retrieving revision 1.11 retrieving revision 1.11.2.1 diff -u -r1.11 -r1.11.2.1 --- squid3/configure.in 23 Nov 2002 03:13:04 -0000 1.11 +++ squid3/configure.in 9 Dec 2002 14:14:06 -0000 1.11.2.1 @@ -3,7 +3,7 @@ dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.11 2002/11/23 03:13:04 squidadm Exp $ +dnl $Id: configure.in,v 1.11.2.1 2002/12/09 14:14:06 apbarrett Exp $ dnl dnl dnl @@ -13,7 +13,7 @@ AC_CONFIG_AUX_DIR(cfgaux) AM_INIT_AUTOMAKE(squid, 3.0-DEVEL) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.11 $)dnl +AC_REVISION($Revision: 1.11.2.1 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -1182,6 +1182,24 @@ fi ]) +follow_xff=1 +AC_ARG_ENABLE(follow-x-forwarded-for, +[ --enable-follow-x-forwarded-for + Enable support for following the X-Forwarded-For + HTTP header to try to find the IP address of the + original or indirect client when a request has + been forwarded through other proxies.], +[ if test "$enableval" = "yes" ; then + echo "follow X-Forwarded-For enabled" + follow_xff=1 + fi +]) +if test $follow_xff = 1; then + AC_DEFINE(FOLLOW_X_FORWARDED_FOR, 1, [Enable following X-Forwarded-For headers]) +else + AC_DEFINE(FOLLOW_X_FORWARDED_FOR, 0) +fi + AC_ARG_WITH(filedescriptors, [ --with-filedescriptors=NUMBER Force squid to support NUMBER filedescriptors], [ squid_filedescriptors_num=$withval ])