From 5cdd0d42a697a753ad5ba58cdda586812bf14a55 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 16 Apr 2012 23:43:52 +0200 Subject: [PATCH] possibility to send xforwardedfor --- .../templates/etc/squid/squid.conf/96xForwardedFor | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/root/etc/e-smith/templates/etc/squid/squid.conf/96xForwardedFor b/root/etc/e-smith/templates/etc/squid/squid.conf/96xForwardedFor index 3d856af..77b2d3c 100644 --- a/root/etc/e-smith/templates/etc/squid/squid.conf/96xForwardedFor +++ b/root/etc/e-smith/templates/etc/squid/squid.conf/96xForwardedFor @@ -1,6 +1,18 @@ +{ + +my $fwd = $squid{'XForwardedFor'} || 'no'; + +unless ($fwd =~ m/^yes|enabled|on|1$/i){ + $OUT .=<<"EOF"; -acl localhost src 127.0.0.1 -follow_x_forwarded_for allow localhost forwarded_for off header_access X-Forwarded-For deny all +EOF +} +else{ + $OUT .= ''; +} + +} +