Imagery - add url alias support
[chef.git] / cookbooks / imagery / templates / default / nginx_imagery_layer_fragment.conf.erb
index 721867f34c7025d79e30859a11ee286f60fed28b..1c58bd4e3e8aa8c096c84234e8a7942d38b15236 100644 (file)
@@ -11,3 +11,6 @@ location ~* "^/layer/<%= @layer %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" {
 <% if @root_layer -%>
 rewrite "^/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
 <% end -%>
+<% @url_aliases.each do |url| -%>
+rewrite "^<%= url %>/(\d+)/(\d+)/(\d+)\.(png|jpg|jpeg)$" "/layer/<%= @layer %>/$1/$2/$3.$4" last;
+<% end -%>