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 .= ''; +} + +} +