diff --git a/manifests/selector.pp b/manifests/selector.pp index 78c95c4..e16fbc5 100644 --- a/manifests/selector.pp +++ b/manifests/selector.pp @@ -1,5 +1,6 @@ #selector.pp define varnish::selector( + $director = $name, $condition, $newurl = undef, $movedto = undef, diff --git a/templates/includes/backendselection.vcl.erb b/templates/includes/backendselection.vcl.erb index 3921b2a..281b6b6 100644 --- a/templates/includes/backendselection.vcl.erb +++ b/templates/includes/backendselection.vcl.erb @@ -2,7 +2,7 @@ if (<%= @condition -%>) { <%- if @movedto -%> error 750 "<%= @movedto -%>" + req.url; <%- else -%> - set req.backend = <%= @title -%>; + set req.backend = <%= @director -%>; <%- if @newurl -%> set req.url = <%= @newurl -%>; <%- end -%>