Changeset View
Changeset View
Standalone View
Standalone View
site-modules/profile/templates/varnish/vhost.vcl.erb
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | <% if @hsts_max_age -%> | ||||
set resp.http.Strict-Transport-Security = "max-age=<%= @hsts_max_age %>;"; | set resp.http.Strict-Transport-Security = "max-age=<%= @hsts_max_age %>;"; | ||||
} | } | ||||
<% end -%> | <% end -%> | ||||
<% if @vcl_deliver_extra -%> | <% if @vcl_deliver_extra -%> | ||||
<%= @vcl_deliver_extra %> | <%= @vcl_deliver_extra %> | ||||
<% end -%> | <% end -%> | ||||
} | } | ||||
} | } | ||||
sub vcl_synth { | |||||
if ( | |||||
<% @aliases.each do |alias_| -%> | |||||
req.http.host ~ "^(?i)<%= Regexp.escape(alias_) %>(:[0-9]+)?$" || | |||||
<% end -%> | <% end -%> | ||||
req.http.host ~ "^(?i)<%= Regexp.escape(@servername) %>(:[0-9]+)?$" | |||||
) { | |||||
if (resp.status == 401) { | |||||
olasd: I suspect that this line isn't needed :-) | |||||
Done Inline Actionsindeed, thanks vsellier: indeed, thanks | |||||
set resp.http.WWW-Authenticate = "Basic"; | |||||
return(deliver); | |||||
} | |||||
} | |||||
} | |||||
<% end -%> | |||||
I suspect that this line isn't needed :-)