diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-04-27 22:27:50 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-04-27 22:27:50 -0400 |
commit | 1ece4960bec4edafa3b678fbab29dd7db65550fd (patch) | |
tree | 49c90e5aef9ed95125b0cf3d8837dff0eb5607fe /config/varnish64/varnish.inc | |
parent | fb0db804efaa6cb7fedb22c961c1c5c665dd6374 (diff) | |
download | pfsense-packages-1ece4960bec4edafa3b678fbab29dd7db65550fd.tar.gz pfsense-packages-1ece4960bec4edafa3b678fbab29dd7db65550fd.tar.bz2 pfsense-packages-1ece4960bec4edafa3b678fbab29dd7db65550fd.zip |
Allow matching against regexes in the URL as well
Diffstat (limited to 'config/varnish64/varnish.inc')
-rw-r--r-- | config/varnish64/varnish.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/config/varnish64/varnish.inc b/config/varnish64/varnish.inc index 33525bdf..042db490 100644 --- a/config/varnish64/varnish.inc +++ b/config/varnish64/varnish.inc @@ -124,10 +124,14 @@ EOAU; foreach($config['installedpackages']['varnishbackends']['config'] as $urlmapping) { if($urlmapping['row']) foreach($urlmapping['row'] as $url) { + if($url['fieldtype']) + $fieldtype = $url['fieldtype']; + else + $fieldtype = "=="; if(!$isfirst) $urlmappings .= "else "; $urlmappings .= <<<EOAU -if (req.http.host == "{$url['urlmapping']}") { +if (req.http.host {$fieldtype} "{$url['urlmapping']}") { set req.backend = {$urlmapping['backendname']}BACKEND; set req.http.host = "{$url['urlmapping']}"; } |