Skip to content
This repository has been archived by the owner on Aug 31, 2023. It is now read-only.

Commit

Permalink
Sort fastcgi params to have stable ordering
Browse files Browse the repository at this point in the history
The hash sorting was started in voxpupuli#532 and this fixes it for fastcgi as
well.
  • Loading branch information
mlafeldt committed Feb 5, 2015
1 parent 2917a35 commit cfdd744
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 cfdd744

Please sign in to comment.