diff options
author | Scott Ullrich <sullrich@gmail.com> | 2011-12-06 13:16:42 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@gmail.com> | 2011-12-06 13:16:42 -0500 |
commit | d59adc5e18da33e14fcc299f754cdbddbbb0a3d3 (patch) | |
tree | 719bf94f3d53d5197eccf30c4b07e8b04b659c63 /config/varnish64 | |
parent | 5c50b7c2b856b5136c1b404219146c2c410b6ed8 (diff) | |
download | pfsense-packages-d59adc5e18da33e14fcc299f754cdbddbbb0a3d3.tar.gz pfsense-packages-d59adc5e18da33e14fcc299f754cdbddbbb0a3d3.tar.bz2 pfsense-packages-d59adc5e18da33e14fcc299f754cdbddbbb0a3d3.zip |
Correct backend bug when no hosts are defined as equals or regex
Diffstat (limited to 'config/varnish64')
-rw-r--r-- | config/varnish64/varnish.inc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index 7b514780..24891215 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -137,6 +137,7 @@ function varnish_get_url_mappings_txt() { #director with no host or url, so director for catch all traffic not specified in config $lasturlmappings = "\telse\t{\n\t\tset req.backend = ".$url['directorname'].";\n\t\t}\n"; $catch_all = "set"; + $isfirst = false; } else{ if(!$isfirst) @@ -149,12 +150,13 @@ function varnish_get_url_mappings_txt() { $urlfailover = "\t\t\tset req.backend = ".$url['failover'].";"; $urlmappings .= "\t\tif (req.restarts == 0) {\n".$urlbackend.$tabs.$directo_grace_time.$tabs."}"; $urlmappings .= "\n\t\telse\t{\n".$urlfailover.$tabs.$directo_grace_time.$tabs."}\n\t\t}\n"; + $isfirst = false; } else{ $tabs=($url['grace']?"\n\t\t":""); $urlmappings .= $urlbackend.$tabs.$directo_grace_time."\n\t\t}\n"; + $isfirst = false; } - $isfirst = false; } } } |