Skip to content

Commit

Permalink
Simplify array walk in templates/server/location_header.erb
Browse files Browse the repository at this point in the history
Co-authored-by: Romain Tartière <romain@blogreen.org>
  • Loading branch information
2 people authored and kenyon committed Nov 1, 2023
1 parent 0e68508 commit 7afecf5
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions templates/server/location_header.erb
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,8 @@
<%- end -%>
<% end -%>
<% if @limit_zone -%>
<%- if @limit_zone.is_a?(Array) then -%>
<%- for lz in @limit_zone -%>
<%- Array(@limit_zone).each do |lz| -%>
limit_req zone=<%= lz %>;
<%- end -%>
<%- else -%>
limit_req zone=<%= @limit_zone %>;
<%- end -%>
<% end -%>
<% if @reset_timedout_connection -%>
Expand Down

0 comments on commit 7afecf5

Please sign in to comment.