Merge pull request #606 from 3flex/602-fix-redundant-code
vhost: simplify maintenance variable code
This commit is contained in:
commit
143e840ed1
2 changed files with 2 additions and 12 deletions
|
@ -103,13 +103,8 @@ server {
|
|||
<%- end -%>
|
||||
<% end -%>
|
||||
<% if @maintenance -%>
|
||||
set $maintenance "on";
|
||||
<% else -%>
|
||||
set $maintenance "off";
|
||||
<%= @maintenance_value %>;
|
||||
<% end -%>
|
||||
if ($maintenance = "on") {
|
||||
<%= @maintenance_value %>;
|
||||
}
|
||||
<% if @rewrite_to_https -%>
|
||||
if ($ssl_protocol = "") {
|
||||
return 301 https://$host<% if @ssl_port.to_i != 443 %>:<%= @ssl_port %><% end %>$request_uri;
|
||||
|
|
|
@ -77,13 +77,8 @@ server {
|
|||
|
||||
<% end -%>
|
||||
<% if @maintenance -%>
|
||||
set $maintenance "on";
|
||||
<% else -%>
|
||||
set $maintenance "off";
|
||||
<%= @maintenance_value %>;
|
||||
<% end -%>
|
||||
if ($maintenance = "on") {
|
||||
<%= @maintenance_value %>;
|
||||
}
|
||||
<% if Array(@resolver).count > 0 -%>
|
||||
resolver <% Array(@resolver).each do |r| %> <%= r %><% end %>;
|
||||
<% end -%>
|
||||
|
|
Loading…
Reference in a new issue