From e2bdf0c49f41f239379cc5047170b398e4ef48f9 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 27 Apr 2010 19:56:38 -0400 Subject: Add vcl_recv field --- config/varnish64/varnish.inc | 20 +++++++++++++------- config/varnish64/varnish_custom_vcl.xml | 16 ++++++++++++++++ 2 files changed, 29 insertions(+), 7 deletions(-) (limited to 'config/varnish64') diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index e99e90c1..dc343a44 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -35,6 +35,10 @@ function sync_package_varnish() { global $config, $g; if($config['installedpackages']['varnishcustomvcl']['config'] != "") { foreach($config['installedpackages']['varnishcustomvcl']['config'] as $vcl) { + if($vcl['vcl_recv_early']) + $vcl_recv_early = $vcl['vcl_recv_early']; + if($vcl['vcl_recv_late']) + $vcl_recv_late = $vcl['vcl_recv_late']; if($vcl['vcl_fetch_early']) $vcl_fetch_early = $vcl['vcl_fetch_early']; if($vcl['vcl_fetch_late']) @@ -139,16 +143,18 @@ EOAU; foreach($config['installedpackages']['varnishbackends']['config'] as $urlmapping) { if($config['installedpackages']['varnishbackends']['config']) foreach($config['installedpackages']['varnishbackends']['config'] as $urlmapping) { - foreach($urlmapping['row'] as $url) - if(!$isfirst) - $urlmappings .= "else "; - $urlmappings .= << + + vcl_recv_early + vcl_recv_early + Paste your custom vcl_recv]]> code here. This code will be included at the beginning of the vcl_recv function. + textarea + 50 + 10 + + + vcl_recv_late + vcl_recv_late + Paste your custom vcl_recv]]> code here. This code will be included at the end of the vcl_recv function. + textarea + 50 + 10 + vcl_fetch_early vcl_fetch_early -- cgit v1.2.3