aboutsummaryrefslogtreecommitdiffstats
path: root/config
diff options
context:
space:
mode:
authormarcelloc <marcellocoutinho@gmail.com>2011-08-03 18:21:20 -0300
committermarcelloc <marcellocoutinho@gmail.com>2011-08-03 18:21:20 -0300
commit34cf5486b77b567f36b4190970deabffb5713a8c (patch)
treed3f1a9f949c79b89205ef23d9dbf918e46c1dae8 /config
parent4de44d167dc13ae53be396bc427126930505c36c (diff)
downloadpfsense-packages-34cf5486b77b567f36b4190970deabffb5713a8c.tar.gz
pfsense-packages-34cf5486b77b567f36b4190970deabffb5713a8c.tar.bz2
pfsense-packages-34cf5486b77b567f36b4190970deabffb5713a8c.zip
include base64 decode for custom fields
fix minor bug in basic vcl loop 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