aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@gmail.com>2011-08-03 14:24:20 -0700
committerScott Ullrich <sullrich@gmail.com>2011-08-03 14:24:20 -0700
commit0bb94cd3bd10360bb42a3039a2d1edb25aaf62ce (patch)
treed3f1a9f949c79b89205ef23d9dbf918e46c1dae8 /config
parent4de44d167dc13ae53be396bc427126930505c36c (diff)
parent34cf5486b77b567f36b4190970deabffb5713a8c (diff)
downloadpfsense-packages-0bb94cd3bd10360bb42a3039a2d1edb25aaf62ce.tar.gz
pfsense-packages-0bb94cd3bd10360bb42a3039a2d1edb25aaf62ce.tar.bz2
pfsense-packages-0bb94cd3bd10360bb42a3039a2d1edb25aaf62ce.zip
Merge pull request #17 from marcelloc/patch-10
include base64 decode for custom fields and fix basic_vcl position
Diffstat (limited to 'config')
-rw-r--r--config/varnish64/varnish.inc18
1 files changed, 9 insertions, 9 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc
index 76b16931..76f61ec4 100644
--- a/config/varnish64/varnish.inc
+++ b/config/varnish64/varnish.inc
@@ -296,18 +296,19 @@ function sync_package_varnish() {
if($config['installedpackages']['varnishcustomvcl']['config'] != "") {
foreach($config['installedpackages']['varnishcustomvcl']['config'] as $vcl) {
if($vcl['vcl_recv_early'])
- $vcl_recv_early = $vcl['vcl_recv_early'];
+ $vcl_recv_early = base64_decode($vcl['vcl_recv_early']);
if($vcl['vcl_recv_late'])
- $vcl_recv_late = $vcl['vcl_recv_late'];
+ $vcl_recv_late = base64_decode($vcl['vcl_recv_late']);
if($vcl['vcl_fetch_early'])
- $vcl_fetch_early = $vcl['vcl_fetch_early'];
+ $vcl_fetch_early = base64_decode($vcl['vcl_fetch_early']);
if($vcl['vcl_fetch_late'])
- $vcl_fetch_late = $vcl['vcl_fetch_late'];
+ $vcl_fetch_late = base64_decode($vcl['vcl_fetch_late']);
if($vcl['vcl_pipe_early'])
- $vcl_pipe_early = $vcl['vcl_pipe_early'];
+ $vcl_pipe_early = base64_decode($vcl['vcl_pipe_early']);
if($vcl['vcl_pipe_late'])
- $vcl_pipe_late = $vcl['vcl_pipe_late'];
+ $vcl_pipe_late = base64_decode($vcl['vcl_pipe_late']);
}
+ }
$vcl_recv_basic='#BASIC VCL RULES'."\n";
foreach($config['installedpackages']['varnishsettings']['config'] as $vcl) {
if($vcl['sessioncache']){
@@ -336,7 +337,7 @@ function sync_package_varnish() {
$vcl_recv_basic.="\t".'if (req.request != "GET" && req.request != "HEAD" && req.request != "PUT" && req.request != "POST" &&'."\n";
$vcl_recv_basic.="\t".' req.request != "TRACE" && req.request != "OPTIONS" && req.request != "DELETE") {return(pipe);}'."\n\n";
}
-if($vcl['xforward']){
+ if($vcl['xforward']){
$vcl_recv_basic.="\t#set X-forward\n";
switch ($vcl['xforward']){
case 'set':
@@ -368,10 +369,9 @@ if($vcl['xforward']){
}
}
if($vcl['htmlerror'] && !$errorvcl){
- $errorvcl=$vcl['htmlerror'];
+ $errorvcl=base64_decode($vcl['htmlerror']);
}
}
- }
if(!$errorvcl)
$errorvcl = <<<EOF