Skip to content

Commit

Permalink
Merge pull request voxpupuli#561 from Jimdo/fastcgi_param_ordering
Browse files Browse the repository at this point in the history
Sort fastcgi params to have stable ordering
  • Loading branch information
jfryman committed Feb 5, 2015
2 parents b1eeab1 + 45977c8 commit 05f7969
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/vhost/locations/fastcgi.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<% end -%>
<% if defined? @fastcgi_param -%>
<%- field_width = @fastcgi_param.inject(0) { |l,(k,v)| k.size > l ? k.size : l } -%>
<%- @fastcgi_param.each do |key, val| -%>
<%- @fastcgi_param.sort_by {|k,v| k}.each do |key, val| -%>
fastcgi_param <%= sprintf("%-*s", field_width, key) %> <%= val %>;
<%- end -%>
<% end -%>

0 comments on commit 05f7969

Please sign in to comment.