From 0a12b0c187dfd965f42037efc77fbc4b971109e5 Mon Sep 17 00:00:00 2001 From: lgcosta Date: Fri, 26 Aug 2011 02:17:54 -0300 Subject: Custom Options should be before the options of general allow and any other blocks --- config/squid/squid.inc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/config/squid/squid.inc b/config/squid/squid.inc index 8a4de81e..7a31f750 100644 --- a/config/squid/squid.inc +++ b/config/squid/squid.inc @@ -944,6 +944,15 @@ function squid_resync_auth() { $settingsconfig = $config['installedpackages']['squid']['config'][0]; $conf = ''; + // Custom Options + if(!empty($config['installedpackages']['squid']['config'][0]['custom_options'])) { + $custopts = explode(";", ($config['installedpackages']['squid']['config'][0]['custom_options'])); + $conf .= "# Custom options\n"; + foreach ($custopts as $custopt) { + $conf .= $custopt."\n"; + } + } + // Deny the banned guys before allowing the good guys if(! empty($settingsnac['banned_hosts'])) { if (squid_is_valid_acl('banned_hosts')) { @@ -1058,14 +1067,6 @@ EOD; $conf .= "http_access allow password $acl\n"; } - if(!empty($config['installedpackages']['squid']['config'][0]['custom_options'])) { - $custopts = explode(";", ($config['installedpackages']['squid']['config'][0]['custom_options'])); - $conf .= "# Custom options\n"; - foreach ($custopts as $custopt) { - $conf .= $custopt."\n"; - } - } - $conf .= "# Default block all to be sure\n"; $conf .= "http_access deny all\n"; -- cgit v1.2.3