Sha256: 264c1a3436bfe3730ff12e80ae10d2dea0bf1eb6e0ea5edc18879d6df94bf9b3
Contents?: true
Size: 1.16 KB
Versions: 7
Compression:
Stored size: 1.16 KB
Contents
<% is_first = true %> vcl 4.0; # generated varnish config: <%= ENVIRONMENT %> # local test: <%= LOCAL_TEST_MODE ? 'ENABLED' : 'DISABLED' %> sub vcl_recv { std.log("pre varnish log info '<%= domain.name %>':" + req.http.host); if (req.http.host ~ "<%= domain.name %>$") { std.log("varnish log info '<%= domain.name %>':" + req.http.host); <% domain.subdomains.each_pair do |subdomain_name, subdomain| %> <% unless '_general'.eql? subdomain_name %><%= is_first ? '' : 'else ' %>if (req.http.host ~ "^<%= subdomain.name %>.<%= domain.name %>$") {<% end %> std.log("subdomain identified '<%= subdomain.name %>.<%= domain.name %>':" + req.http.host + " url: " + req.url ); <% subdomain.assets.each_pair do |url, page| %> if (req.url ~ "^<%= prepare_url url %>") { std.log("page identified '<%= subdomain.name %>.<%= domain.name %>' Page:'<%= url %>':" + req.url); set req.backend_hint = <%= page.director %>.backend(); <% unless page.plugin_url.nil? %>set req.url = "<%= page.plugin_url %>";<% end %> return (hash); } <% end %> <% unless '_general'.eql? subdomain_name %> } <% is_first = false %> <% end %> <% end %> } }
Version data entries
7 entries across 7 versions & 1 rubygems