blob: 7892ad95278b023cd42bc4bedb505092529f101d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
!Simulate the autotools bootstrap of the follow-x-forwarded-for patchset.
!
!Beware that all line number informations in configure.log greater
!than 2972 are offset by at least -29 (correcting all line numbers would have
!bloated the patch by 92kB!)
--- include/autoconf.h.in.orig Sat Jan 18 02:46:11 2003
+++ include/autoconf.h.in Thu Jun 24 13:19:07 2004
@@ -291,6 +291,12 @@
#define USE_IDENT 1
/*
+ * Compile in support for following X-Forwarded-For headers?
+ * Enabled by default.
+ */
+#define FOLLOW_X_FORWARDED_FOR 1
+
+/*
* If your system has statvfs(), and if it actually works!
*/
#undef HAVE_STATVFS
--- configure.orig Thu Sep 22 10:16:26 2005
+++ configure Thu Sep 22 17:29:01 2005
@@ -249,6 +249,12 @@
if you build as another user who is not privileged
to use the number of filedescriptors you want the
resulting binary to support"
+ac_help="$ac_help
+ --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."
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -3255,6 +3261,29 @@
fi
+
+follow_xff=1
+# Check whether --enable-follow-x-forwarded-for or --disable-follow-x-forwarded-for was given.
+if test "${enable_follow_x_forwarded_for+set}" = set; then
+ enableval="$enable_follow_x_forwarded_for"
+ if test "$enableval" = "yes" ; then
+ echo "follow X-Forwarded-For enabled"
+ follow_xff=1
+ fi
+
+fi
+
+if test $follow_xff = 1; then
+ cat >> confdefs.h <<\EOF
+#define FOLLOW_X_FORWARDED_FOR 1
+EOF
+
+else
+ cat >> confdefs.h <<\EOF
+#define FOLLOW_X_FORWARDED_FOR 0
+EOF
+
+fi
# Force some compilers to use ANSI features
#
|