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
ltning and smortex authored Oct 10, 2023
1 parent e4c5cac commit 00ad12f
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 00ad12f

Please sign in to comment.